Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp421157rdb; Thu, 2 Nov 2023 07:31:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGowh+irlgQYOwRdIkl0hvLF5fYzLhwzv1BhLEOBXSMiJ01RDzUeOOqVZDdEEBwNdnIt2t+ X-Received: by 2002:a17:903:30d4:b0:1c4:4462:f1bd with SMTP id s20-20020a17090330d400b001c44462f1bdmr13582487plc.35.1698935510754; Thu, 02 Nov 2023 07:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698935510; cv=none; d=google.com; s=arc-20160816; b=RQ90oygka5DSa+t3aNLtsQMokx2kcSD8JQ60o5pkcZhA7r02Jji8ssLfOHULGGqTS9 nhoa7RsJo6lNsn6TXcvsJ4smUS569+sVAWIqPUu9OKSa3iLlhLbbYd3Rz0S7b/mzZkRZ PB4Sv2BJURaq6dQlePDeAHwPG2XbZQjx4s9d2BwvqbOpkiK5JJKr6ouvSKEWPSp2EJD1 hxj5zv0FH/8hQCwxWVXJi3FNrARGanmv/gIqxJxYj+35JTc96R1nxDIlHAFqKqtmwIg9 YMqhTxa/SBRWLkIBDdM/6aHIS4SxUPFWqZ4UsDW8doyx2h6EpousryP3jDvdrlwZYbPD FYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o8QguhxhQJAOvV6WnAJA2MEGWZVqgxpll3qDuJGUmYs=; fh=mPRMMzuLULPtDEiCKCzTE1nrNZpitix1L4iqUtcbrsw=; b=cF1J9fmQ+HN1lRyZLLYdP/cgM4rCKQ1HXn4wsXPwDYNtaCdEd+pEY+JkRq6oWwloVD 9cEOO+vD0Ep8h+juEEWMvanCX/BMIkMfvQZV99/Fk4CNv8KzpksQAIop1Rb6DDgxZDUV /ZHcMgAi5H4rYsonRqX/bXub6FxBHd6itqNlD0klyiVC+MGzqkpV/4kK3HB1WgXUxQss 8rWCg8BplKIF1BX9zkYe9zG7aa8THLa8sAFsPWcf61kg6/hB8a38SvRd7qn013nnvHUl iDHy4TiUvdMuLlqacVHj68xeocEnTixN/CuxrGDpeqbHTEmGRXAEUfhvQNbGoVkARXqg 82Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/uLoMdZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k21-20020a635615000000b005b3e61af56esi1779322pgb.121.2023.11.02.07.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/uLoMdZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 07EF380236E4; Thu, 2 Nov 2023 07:31:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235629AbjKBO3X (ORCPT + 99 others); Thu, 2 Nov 2023 10:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235516AbjKBO3M (ORCPT ); Thu, 2 Nov 2023 10:29:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E118B13A for ; Thu, 2 Nov 2023 07:29:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1DE8C433BA; Thu, 2 Nov 2023 14:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698935343; bh=bRsB7LoOlwnaeDzBn85F8lO8jv7acyGjA2Bu9E6BZ2Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M/uLoMdZ7OeZHtSdv51jpB5lwNINNYilKSiD8FCSlvz3Wd5OhVqN7DpoiuTvn8mhi HNUUEXa//lmAQ4U16ismcVo9rOtNfuc8BrCzIZLvx2pYfPkaY3OsmYoSvxxpv3NEMP SULUnKFIWBs+xxjqeYA6fjFYOPDA5cvceyUbPu/U= Date: Thu, 2 Nov 2023 15:28:58 +0100 From: Greg KH To: Pasha Tatashin Cc: Sourav Panda , corbet@lwn.net, rafael@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, muchun.song@linux.dev, rppt@kernel.org, david@redhat.com, rdunlap@infradead.org, chenlinxuan@uniontech.com, yang.yang29@zte.com.cn, tomas.mudrunka@gmail.com, bhelgaas@google.com, ivan@cloudflare.com, yosryahmed@google.com, hannes@cmpxchg.org, shakeelb@google.com, kirill.shutemov@linux.intel.com, wangkefeng.wang@huawei.com, adobriyan@gmail.com, vbabka@suse.cz, Liam.Howlett@oracle.com, surenb@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, weixugc@google.com Subject: Re: [PATCH v5 1/1] mm: report per-page metadata information Message-ID: <2023110216-labrador-neurosis-1e6e@gregkh> References: <20231101230816.1459373-1-souravpanda@google.com> <20231101230816.1459373-2-souravpanda@google.com> <2023110205-enquirer-sponge-4f35@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:31:19 -0700 (PDT) On Thu, Nov 02, 2023 at 10:24:04AM -0400, Pasha Tatashin wrote: > On Thu, Nov 2, 2023 at 1:42 AM Greg KH wrote: > > > > On Wed, Nov 01, 2023 at 04:08:16PM -0700, Sourav Panda wrote: > > > Adds a new per-node PageMetadata field to > > > /sys/devices/system/node/nodeN/meminfo > > > > No, this file is already an abuse of sysfs and we need to get rid of it > > (it has multiple values in one file.) Please do not add to the > > nightmare by adding new values. > > Hi Greg, > > Today, nodeN/meminfo is a counterpart of /proc/meminfo, they contain > almost identical fields, but show node-wide and system-wide views. And that is wrong, and again, an abuse of sysfs, please do not continue to add to it, that will only cause problems. > Since per-page metadata is added into /proc/meminfo, it is logical to > add into nodeN/meminfo, some nodes can have more or less struct page > data based on size of the node, and also the way memory is configured, > such as use of vmemamp optimization etc, therefore this information is > useful to users. > > I am not aware of any example of where a system-wide field from > /proc/meminfo is represented as a separate sysfs file under node0/. If > nodeN/meminfo is ever broken down into separate files it will affect > all the fields in it the same way with or without per-page metadata All of the fields should be individual files, please start adding them if you want to add new items, I do not want to see additional abuse here as that will cause problems (as you are seeing with the proc file.) > > Also, even if you did want to do this, you didn't document it properly > > in Documentation/ABI/ :( > > The documentation for the fields in nodeN/meminfo is only specified > in Documentation/filesystems/proc.rst, there is no separate sysfs > Documentation for the fields in this file, we could certainly add > that. All sysfs files need to be documented in Documentation/ABI/ otherwise you should get a warning when running our testing scripts. thanks, greg k-h