From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41029C48285 for ; Wed, 31 Jan 2024 08:50:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 675216B0078; Wed, 31 Jan 2024 03:50:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 625CA6B007D; Wed, 31 Jan 2024 03:50:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4ECFC6B0080; Wed, 31 Jan 2024 03:50:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3CB846B0078 for ; Wed, 31 Jan 2024 03:50:33 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AD379403FD for ; Wed, 31 Jan 2024 08:50:32 +0000 (UTC) X-FDA: 81738985104.11.6793262 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by imf30.hostedemail.com (Postfix) with ESMTP id ABB1380015 for ; Wed, 31 Jan 2024 08:50:29 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of Chunyan.Zhang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=Chunyan.Zhang@unisoc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706691031; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=TvsjYQ+/VmAwlEVzpEuDq+pJ75D+xuaVmRlqQ7llAQA=; b=1pEDoJDVZNLcz7aUCyIf0cebIP57CwnSfN7oK1B9lYOn9IpOJqykSOtgsZc2kTyCqR6ttd ql7IpCyYg4WRwglWoQ4KH/05iI3ZNIibXvnHH2ei6q/rFzlI4sJbGimI6j0qKRuJ3neTMY F1giTngxAwtVYtnms2iPqygCBfK0bg0= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of Chunyan.Zhang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=Chunyan.Zhang@unisoc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706691031; a=rsa-sha256; cv=none; b=Mi13SxpCdZUrQ4TlCOXnDcKk6Eayei1+JNkNw3KHp5zfr1HJ2AHSvgnGVJ9AxEBpT/EINH U7coqTqmXIQpbJaXmL6sbdpt4NBHytCkL4YYitkUFVm+IoqL6lkHIK5+0eT5WV8feX8Hft xqqWYpueEZ8szlm8A7DO4JCEYjAgHD8= Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 40V8nuvk032172; Wed, 31 Jan 2024 16:49:56 +0800 (+08) (envelope-from Chunyan.Zhang@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4TPwWv18wkz2SB7BY; Wed, 31 Jan 2024 16:42:19 +0800 (CST) Received: from ubt.spreadtrum.com (10.0.73.88) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 31 Jan 2024 16:49:53 +0800 From: Chunyan Zhang To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com> CC: , , Fangzheng Zhang , Fangzheng Zhang , Yuming Han , Chunyan Zhang Subject: [PATCH] mm/slab: Add slabreclaim flag to slabinfo Date: Wed, 31 Jan 2024 16:49:49 +0800 Message-ID: <20240131084949.449740-1-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Originating-IP: [10.0.73.88] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL:SHSQR01.spreadtrum.com 40V8nuvk032172 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: ABB1380015 X-Stat-Signature: 3qibyry5zboq34aspf7eui76dujf65wx X-Rspam-User: X-HE-Tag: 1706691029-941712 X-HE-Meta: U2FsdGVkX1/1386xLniMDPkdq2hjtUue8TNVdWN4wBvnFZgmtCr9kZX1KIFsuV70u/Sa53sPbY37N5prcLP1wS5wTDfRFJBgslWBMF6GE4LaalBfWAyDe1Eqmpbz4qQwJ6ZTZ8A9QfK2Isaggru7CLbqmJtlMa2oiLFSU6MMcyVZBdKIjeg0tvBdavHrZjhC3A7Tqf0wvgfxwwQcT0ZSo/kkODtUVSTTcGXFaQWsNvsK7jFwCE/XOrAgv70e562HyLUmzIC717w0no9uJNPLpUOaO1FnsVoKo6HUubxvs6ART+OW3Idp+HuCieP5Rl2sYyTTWS7FI/tM40XSjy8uU7CiymO1E+3ralE+VhCmN3gfs/O3/8XcXBNtPFAtwjys8gX2aVImVDkCHFaCeVyfcdzoaRws7qmCvRG1LmdekLx32KtY4X7ocRPfdHlPFsuacuduvICqPsFrewZ0TSlT/hcd3fF4aWkmHt/hjmC+eLLHk8UiB0FS6aZMoZYQC9XidypmYGfx45lPoI+5RLe84vUIX12T1MvSlV36IS0HGDbBTFoW3LHJRIwzAumGcszXSGiK7vsWSaHqqVigPi/ClZL46ceH16eu8IUnUojolwxOTcKFbE+iCV1iT+fNtjfj2fjllWHnzFuSaEXW44HXjCnAd9xIshpagdzP6Y/nAKXPG/ayF+CGsuZcGsmhbmT9pbEWPXoNc7JaobAI5V3HwEoyyPd2gal2o7GB/qdf+got0av/+6n48NLX9qU2W3vJ0lLj4G+IVb9doOU9G9BYi1Y/F0aGigoMAksirE9d26vfus+xuk1LFsA+CQUdiG/rBcL82EcsrXSOMlkAQzXLnan4s3CPZIHjq9e1tMr5ZV2mL1cE7ixT//SBQC1H+faXohD67JG41tDaWKc1GsFGm3F0C81682+yqJ7AZDvqiCNWchy92+TDA7QT43PHuUBZRO7EOhgnebDnhaiVTHD Anznw9id 7h3QXTkoEVpmRxz7SoXe/5X/h/4AMuYqWJgineP7iBVS9yirvMSpvdeu36cbHf8BcTw2W/efHWHA1giCowpcKKnE7VaoeVJWzUOoWGMxWN+Q/DsDDmHfKETnojwQypYks6upxcpmnNcC+FYXYOCT+Uz9qAC+b+8zgKJbB0E+QH2HCxdItn9wj1kbPFTIP/PMMM+bfr6ubLToemn7vmlQb4XTbz9EYrPtxGu5cYv4hCYg63lmrTcHQJNRXxX2W6T3yipy8gZSgnJ+x07rwemC8RxLKLA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Fangzheng Zhang In order to enhance slab debugging, we add slabreclaim flag to slabinfo. Slab type is also an important analysis point in slabinfo for per slab, when various problems such as memory leaks or memory statistics occur. Signed-off-by: Fangzheng Zhang Signed-off-by: Chunyan Zhang --- mm/slab_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index 238293b1dbe1..aeeb2bfe6dda 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1038,7 +1038,7 @@ static void print_slabinfo_header(struct seq_file *m) seq_puts(m, "slabinfo - version: 2.1\n"); seq_puts(m, "# name <= objperslab> "); seq_puts(m, " : tunables "); - seq_puts(m, " : slabdata ")= ; + seq_puts(m, " : slabdata <= slabreclaim>"); seq_putc(m, '\n'); } @@ -1071,8 +1071,9 @@ static void cache_show(struct kmem_cache *s, struct s= eq_file *m) seq_printf(m, " : tunables %4u %4u %4u", sinfo.limit, sinfo.batchcount, sinfo.shared); - seq_printf(m, " : slabdata %6lu %6lu %6lu", - sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail)= ; + seq_printf(m, " : slabdata %6lu %6lu %6lu %6u", + sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail, + !!(s->flags & SLAB_RECLAIM_ACCOUNT)); slabinfo_show_stats(m, s); seq_putc(m, '\n'); } -- 2.43.0 ________________________________ This email (including its attachments) is intended only for the person or = entity to which it is addressed and may contain information that is privile= ged, confidential or otherwise protected from disclosure. Unauthorized use,= dissemination, distribution or copying of this email or the information he= rein or taking any action in reliance on the contents of this email or the = information herein, by anyone other than the intended recipient, or an empl= oyee or agent responsible for delivering the message to the intended recipi= ent, is strictly prohibited. If you are not the intended recipient, please = do not read, copy, use or disclose any part of this e-mail to others. Pleas= e notify the sender immediately and permanently delete this e-mail and any = attachments if you received it in error. Internet communications cannot be = guaranteed to be timely, secure, error-free or virus-free. The sender does = not accept liability for any errors or omissions. =E6=9C=AC=E9=82=AE=E4=BB=B6=E5=8F=8A=E5=85=B6=E9=99=84=E4=BB=B6=E5=85=B7=E6= =9C=89=E4=BF=9D=E5=AF=86=E6=80=A7=E8=B4=A8=EF=BC=8C=E5=8F=97=E6=B3=95=E5=BE= =8B=E4=BF=9D=E6=8A=A4=E4=B8=8D=E5=BE=97=E6=B3=84=E9=9C=B2=EF=BC=8C=E4=BB=85= =E5=8F=91=E9=80=81=E7=BB=99=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=89=80=E6=8C=87=E7= =89=B9=E5=AE=9A=E6=94=B6=E4=BB=B6=E4=BA=BA=E3=80=82=E4=B8=A5=E7=A6=81=E9=9D= =9E=E7=BB=8F=E6=8E=88=E6=9D=83=E4=BD=BF=E7=94=A8=E3=80=81=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