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 A7C8CC48260 for ; Mon, 19 Feb 2024 08:09:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E60186B0082; Mon, 19 Feb 2024 03:09:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E114C6B0083; Mon, 19 Feb 2024 03:09:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD6A06B0085; Mon, 19 Feb 2024 03:09:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BF72C6B0082 for ; Mon, 19 Feb 2024 03:09:21 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3D205160205 for ; Mon, 19 Feb 2024 08:09:20 +0000 (UTC) X-FDA: 81807828480.13.566EDF8 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf08.hostedemail.com (Postfix) with ESMTP id DF5E016000B for ; Mon, 19 Feb 2024 08:09:17 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="cg/H7Xpu"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="xmYboKy/"; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=LOIXDR6z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="Jn/+HkCr"; dmarc=none; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708330158; 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=7piy8qyiVNpQwftpfWF9GmrBAl11sXKfYWaxpU3VX/w=; b=Yebwq/ymEWbNCD0Oefcf3BsWVs/mQXNQ0qnJHpjMNVl73VJOZSewCgkdmez9SoH6TywRuM PmQX+QKaI3E6vMSLfRxoxFPCrTF/w1P3zNwANl15yYoShiU3RuPZMd7JmJ2xYC9VOoGdj4 m5SyEzlwKa3ZUN9dJEjCrMXlpuFrNxk= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="cg/H7Xpu"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="xmYboKy/"; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=LOIXDR6z; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="Jn/+HkCr"; dmarc=none; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708330158; a=rsa-sha256; cv=none; b=8ezc/8GAh1eildS9dNj1YcScoCk9eyAPq4UhhTAkzcx4gL+6t2kF0FGAZLgjVcIOdpaX2a uNrNzsghS605kBOV3rff1WJEX/pIlT85xBxZ8+CcZzM229TRAlqJP64kH97J/k9OOop5IB Izo+txY00E30O8WF7Dzgr5xzed2e/0A= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3C3A421E93; Mon, 19 Feb 2024 08:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1708330156; h=from:from:reply-to: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; bh=7piy8qyiVNpQwftpfWF9GmrBAl11sXKfYWaxpU3VX/w=; b=cg/H7Xpuhbd8wlkrfk/sq5VwYJDVKZGkuuHWnBBl2pnkDPkZLoRx/UySh6kGFmt+ZkqKA4 8QmU0C8sq/InK5XCIZQO8L0N6AO5ayMUEUePE3x2LIicfRlWsPLha3yRGGNJCwAbkbuorX DHGf99+ANr4GRT/7oCdvFqTaU6hM7Do= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1708330156; h=from:from:reply-to: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; bh=7piy8qyiVNpQwftpfWF9GmrBAl11sXKfYWaxpU3VX/w=; b=xmYboKy/DRJ6mPA/l/Mpx397Fy7dI1DfN9mWuCcx/MPnVqV/5UZ35JxdXAk927N4sTAAc3 NbbUSnQzkUTuB0AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1708330154; h=from:from:reply-to: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; bh=7piy8qyiVNpQwftpfWF9GmrBAl11sXKfYWaxpU3VX/w=; b=LOIXDR6zmW9DUBjlgHCuTeWH3EW00+RwIHiUf5sysOTGqnNoVnTW1H8qOzZPGROU6IuXQ9 2HDaTbeNAPMY0+YKDkrjd848Y0qQzh7Qdg63wetaoKohF4sfqG9EaCP6ofqkdU8RF4zLIi c4u7wN2F8LE86m78ACoO450x/0W77Qg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1708330154; h=from:from:reply-to: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; bh=7piy8qyiVNpQwftpfWF9GmrBAl11sXKfYWaxpU3VX/w=; b=Jn/+HkCrRmhFolAJoid3jzQeFsj9u8rKHCUeFttkQ7zBM469clEpuu3/c6hgKovHXzkSkb KVSODeF/RFUvBNBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1A37F139D0; Mon, 19 Feb 2024 08:09:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OT8SBqoM02X9fwAAD6G6ig (envelope-from ); Mon, 19 Feb 2024 08:09:14 +0000 Message-ID: <4591b2b3-398f-402e-b21d-55b244f05a2e@suse.cz> Date: Mon, 19 Feb 2024 09:09:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 2/2] Documentation: filesystems: introduce proc/slabinfo to users To: zhang fangzheng , Matthew Wilcox Cc: Fangzheng Zhang , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , 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 References: <20240219031911.10372-1-fangzheng.zhang@unisoc.com> <20240219031911.10372-3-fangzheng.zhang@unisoc.com> Content-Language: en-US From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8b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KCRkqKPNCyhkfuc88 JkRY+m+J Kjt7cSMoG9XXmF1XTd9/nhyfH6i+SgbpSOz7A 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 2/19/24 07:23, zhang fangzheng wrote: > On Mon, Feb 19, 2024 at 12:24 PM Matthew Wilcox wrote: >> >> On Mon, Feb 19, 2024 at 11:19:11AM +0800, Fangzheng Zhang wrote: >> > +Note, comes from the collected results in the file >> > +/sys/kernel/slab/$cache/reclaim_account. Next, we will mark /proc/slabinfo >> > +as deprecated and recommend the use of either sysfs directly or >> > +use of the "slabinfo" tool that we have been providing in linux/tools/mm. >> >> Wait, so you're going to all of the trouble of changing the format of >> slabinfo (with the associated costs of updating every tool that currently >> parses it), only to recommend that we stop using it and start using >> tools/mm/slabinfo instead? >> Hi, > The initial purpose was to obtain the type of each slab through > a simple command 'cat proc/slabinfo'. So here, my intention is not to > update all slabinfo-related tools for the time being, but to modify > the version number of proc/slabinfo and further display the results > of using the command. I'm not sure you understand the concern. There are existing consumers of /proc/slabinfo, that might become broken by patch 1/2. We don't even know them all, they might not be all opensource etc. So we can't even make sure all of them are updated. What can happen after patch 1/2: - they keep working and ignore the new column (good) - they include a version check and notice a new unsupported version and refuse to work - confused by the new column they start throwing error, or report wrong stats (that's worse) >> How about we simply do nothing? Agreed wrt modifying /proc/slabinfo > The note here means what changes will occur after > we modify the version number of proc/slabinfo to 2.2. > As for the replacement of tools/mm/slabinfo (that inspired > by Christoph’s suggestions), it will be implemented in the next version > or even the later version. So what is your motivation for all this in the first place? You have some monitoring tool that relies on /proc/slabinfo and want to distinguish reclaimable caches? So you can change it to parse the /sys directories. Is it more work? Yes, but you only have to do that once per boot, because unlike the object/memory stats in /proc/slabinfo, the reclaimable flag will not change for a cache. Would tools/mm/slabinfo almost work for you, but you're missing something? Then send patches for that in the first place. Changing /proc/slabinfo (and breaking other consumers) for a quick and easy fix with a different solution planned for the future is simply not feasible. HTH, Vlastimil > Thanks!