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 B0C4DC48BC4 for ; Tue, 20 Feb 2024 06:25:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2B2486B0078; Tue, 20 Feb 2024 01:25:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 262F96B007B; Tue, 20 Feb 2024 01:25:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 151BC6B007D; Tue, 20 Feb 2024 01:25:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 06DD56B0078 for ; Tue, 20 Feb 2024 01:25:22 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C7ED54057A for ; Tue, 20 Feb 2024 06:25:21 +0000 (UTC) X-FDA: 81811195242.29.426E3BA Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf28.hostedemail.com (Postfix) with ESMTP id 1E565C0005 for ; Tue, 20 Feb 2024 06:25:19 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Ip+V3gMC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of fangzheng.zhang1003@gmail.com designates 209.85.167.46 as permitted sender) smtp.mailfrom=fangzheng.zhang1003@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708410320; a=rsa-sha256; cv=none; b=QGHFncsbHGJCtCsX8BfufUI7RXT2+gvvCzlqoHIcj5ND9TGLw06ATWRe7hK2R3vjx7uWVf lXdSyxESHjaU+pQxnKnFH/bTZiznVbq6Jen1N8acUTc3p9S8+rHb1yKLbQsG4o+0GLWQZs jraV5kcEWZYHZA+k/dg3BGvJrjOMLg4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Ip+V3gMC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of fangzheng.zhang1003@gmail.com designates 209.85.167.46 as permitted sender) smtp.mailfrom=fangzheng.zhang1003@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708410320; 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:in-reply-to:references:references:dkim-signature; bh=SUm5uLuiWHsztob0PnCfvKEIfDnDYyNF8vZfs3mZMuU=; b=TH2ZDhAKcxC9WFfzfROXcLa3YcRNce8d8ewEQkdHAClF3pYhMCBufNFzMQckvu8ZhXo8so UUWuMzUcoYIC+UbVq9tlgZrHkyzLlNbvL6zq/odvNC258uwQAx4mDVsKIjYFCDZTVGGYbJ FO0b6ZlURCtOvynuQ/hhoNXCkWPk4Ss= Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5129c8e651fso3739648e87.3 for ; Mon, 19 Feb 2024 22:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708410318; x=1709015118; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SUm5uLuiWHsztob0PnCfvKEIfDnDYyNF8vZfs3mZMuU=; b=Ip+V3gMC4NyQ2noykQYA4yc90RKIV1GMA9e+lQklpZYm9W8QcqcIFxCNdZvLiIqA5Z m79fKA2Fx2smdNApmZAc+5ugiVcNe/PdxQ344ivR/uZ3zUf6pzENPGDKbI7kbJ7t/iWI InZLKSLWZLNZJrjPBfXIocdCI3nBSSLzA0hoOCwJmtEdS0lr+ZyYUmtFryClOF0LIjF5 hxTTH/rYZzBTBi2B2yLjJBYJkMSV2CsRO1SPF5M3V2VwRqnkSIrWraI/fB3vjUW6ZOxU DZgS/Hmf7qYT7S7jyoqYJ8BNCy3f02tJzegiEDmxg9lyNdaDZpAS3TFAA5mtUP7qg4ME yFLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708410318; x=1709015118; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SUm5uLuiWHsztob0PnCfvKEIfDnDYyNF8vZfs3mZMuU=; b=a2PgsH0OjySbi24MD7a2AnFNcGQ2wvbnhrvykOhPmnshXnJkHXvxlgcsLurKs5kKma lWu3QB5+RpD6YscgN+dY7EVfmMgbxuonoJxi0VlOUTscS9f4jqKFIu5bPgyar9Ee+N/v cIM2fI2r8uhRxfj+1rhjMZztEGyGFfenKyR9VeEF7aNxd/zT55COd3lSskWzSoErADvc 0o0A0pS/9rOi4HNrXnc/E5uXUEwfvOjbUJLJqxS0v5TIOsLdiYPVhaY5dWebtfU0EIvp qaTzIC9OJUJZuPgskCn1Nxr9bWVqPIpotWMZKAFH6ZzmPhHwGCmGPvKj5a4pMDg/ms7Q kYxw== X-Forwarded-Encrypted: i=1; AJvYcCV1kBKscMsW4NIMyHIV2m1OAw7q+1nA+LuLSq9Mk0mJEKrUAaS9CFFrMjRCj74KmORcysUXJQ32nvVfmqtFSgay+Pw= X-Gm-Message-State: AOJu0YyBHWw+xR6TQI9e4Lo0mB289wVXST0zhLclVTb4ezGT388bLPFZ PO8jW2JO6csxHKvnWB0PqYlgn8u987AVQrc6xS2JY+z1KUTNKObn2ZJXW0wXhBnX1ADTpNij8TB 0/nJKN/u2Nk88gpkJmz/fJMOd7g== X-Google-Smtp-Source: AGHT+IEGEjiRa6cGY39cJoh7Inpw4N/t1GFccwnmoUg3ZxjePzAvi5dJkKsrIUxP/whNEF8LmNdhpx1eVikpej1Fndc= X-Received: by 2002:a05:6512:4cd:b0:512:c802:7a9 with SMTP id w13-20020a05651204cd00b00512c80207a9mr354252lfq.38.1708410317935; Mon, 19 Feb 2024 22:25:17 -0800 (PST) MIME-Version: 1.0 References: <20240219031911.10372-1-fangzheng.zhang@unisoc.com> <5cb54690-b357-4e7b-ac6f-23fc8dfe575a@bytedance.com> In-Reply-To: <5cb54690-b357-4e7b-ac6f-23fc8dfe575a@bytedance.com> From: zhang fangzheng Date: Tue, 20 Feb 2024 14:25:06 +0800 Message-ID: Subject: Re: [PATCH V2 0/2] Introduce slabinfo version 2.2 To: Chengming Zhou Cc: Fangzheng Zhang , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Greg KH , linux-mm@kvack.org, linux-kernel@vger.kernel.org, tkjos@google.com, Yuming Han , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1E565C0005 X-Stat-Signature: 5oajysf57ag34p6q1jtxneijp9dc8ytx X-HE-Tag: 1708410319-160155 X-HE-Meta: U2FsdGVkX1/IHkIn8BxSZrNShNQ/nfhJGapWkETD5lnXGxgoH0CgcI6cZvLMYa3n4T68zPhjW0fU6dhJu333IUHbiQsLaxTjV6J4qtKAjT5K2BijPJDpkG5/iDPyd2TWmP8//B7HTtKFUItSiyXEp5WQaw6u/2ONp0SO24pl1wWSv9TWsvDg+h+OnjCJjSIGRqChhZIzVKylBefrvPm6Yy+Yz2r6+36acFtGluoEwvCdA3rnn+Ahu7xxoz6SKcFMrfVnA8M/kR9B4orq6yi5MJvOixQ+OwJP3+JaPZ+q3XMpIqpo4Y9Hdo5rFiehGOc+sdj526NI2rQZNP4oqZ5LbdWlNH8G13nbj7THw9jq9hFTNeiJZvZgbOrmu3Sa2PM3nsJ+tlBqPT/rlqTyHOiSSqAKeb112eSSMaBu/4sg2hHDQgvfST+QjTVerguZZnXgKyV5BTjkaNwTqELvazp7zF3W0BjFupP9k+JXVUJWSu1GdCaYcMH4mN9OWRv0XRTkpddjhEKHibMjCVV5qXewv+og8gehFyvJv5notHnZQhbYPUI2yU/lZNUzUZ+iM5QAtiiRNls/a+jlz+RvFGJseK1cjzF6cDGguW3m8nPU3JzIR/vXQsNwDuVwJdL/xzxRhQ2Gy198t+LgAVV++NLCjvLqbo0teR1ULggklWK13vbMZhnqXF1Im3IiI9a95+YOqjDqKrIqjbnonc/IPJkcdPb+BTqaBkugF6qSS03aeRK99nFct7TS+BasbyWKW/Xs5y3AqVkEcQACebZcQpDqND1hzA0fsOlK8jC0WIG/nGqOnXbe4i6itMhRj90n+cFofxLqxS6S8SmUaeQPQ49DEc8r1SfqDe+EoTuaPcmjSszqKggvqxu/KQO3SecElhAV8P8uh0LcijjGYpzdKgL9gGSOmGfNFHO9Nbc/8mx8ZNL++qEt19ZMvIw4hL3KGXrh+UJZN5Bj/MypCXsoXqR maqXu8fB WpK0ELNt22XeTwL20Ykgrn5mYN7ddDyEPcBIfo1wOjWX6wgMCW1BDsD5M9u3A5ucaTamqlokxoADHEEll1fTVmgR56yi72Rql4EhAXHBO082R9yx09YtzqtsaPBSB42nm4F0vEAGMN2Ns70k= 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: On Mon, Feb 19, 2024 at 7:29=E2=80=AFPM Chengming Zhou wrote: > > On 2024/2/19 11:19, Fangzheng Zhang wrote: > > Hi all, > > > > This series introduces slabinfo version 2.2 to users. > > In slabinfo V2.2, we added a slabreclaim column to > > record whether each slab pool is of reclaim type. > > This will be more conducive for users to obtain > > the type of each slabdata more intuitively than through > > the interface /sys/kernel/slab/$cache/reclaim_account. > > I want to recommend a better tool: drgn[1] for these tasks, instead of ch= anging > the output format of /proc/slabinfo, which may break existing userspace t= ools. > > [1] https://drgn.readthedocs.io/en/latest/index.html# > Thank you very much for providing a new way. I have the following three questions about the new tool you provided: ---- 1. From the introduction, the tool is described as an alternative to the crash utility. Will the permission requirements have different effects when used, user or userdebug? ---- 2. The 'Helpers' chapter introduces the simple use of common.memory, but there is no output example. It involves the use of slab objects, but it also needs to provide a specific slab_cache_name, which cannot give an intuitive overall information like proc/slabinfo. I guess it is difficult to achieve direct output of slab type (reclaim or unreclaim). I don=E2=80=99t know, right? ---- 3. Regarding the supported versions, is it supported for both arm/arm64? I don't seem to have seen any similar instructions. Finally, I would like to express my gratitude again. This tool will be very helpful for me in other future work. > > And we have added an example of the output result > > executing '> cat proc/slabinfo' in the file > > Documentation/filesystems/proc.rst. > > > > Changes in v2: > > - Modify the slabinfo version number to 2.2. > > - Add an example of slabinfo output and future works. > > > > Changes in v1: > > - Add a slabreclaim column to record type of each slab > > in file proc/slabinfo. > > > > [1] https://lore.kernel.org/linux-mm/20240131094442.28834-1-fangzheng.z= hang@unisoc.com/ > > > > Fangzheng Zhang (2): > > mm/slab: Add slabreclaim flag to slabinfo > > Documentation: filesystems: introduce proc/slabinfo to users > > > > Documentation/filesystems/proc.rst | 33 ++++++++++++++++++++++++++++++ > > mm/slab_common.c | 9 ++++---- > > 2 files changed, 38 insertions(+), 4 deletions(-) > >