Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp89466lqg; Wed, 10 Apr 2024 16:58:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXVxGkgbo5pNrAbbGJcSUUr7tp+R51Q/3IwCVa6LdskUGLtgQFBUhSbAsuWAviJzDvgz28HQmyvq79dUNjGPhkHDH7oBpEHG66hYMLyJA== X-Google-Smtp-Source: AGHT+IGQt5LkNfjXY2fx3G19gJRouW48pxtmkZv2y83CkKePT4XYdMg55Fz02DxSjGRjbCeuZ3yC X-Received: by 2002:a2e:9244:0:b0:2d8:d163:2c69 with SMTP id v4-20020a2e9244000000b002d8d1632c69mr1749396ljg.8.1712793522511; Wed, 10 Apr 2024 16:58:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712793522; cv=pass; d=google.com; s=arc-20160816; b=pCdqH2Ro+gM4PBlczlnvP1Fgklx71PLT7HIo32WPtEb7SZ4lOhIrxNbnNZsD2Qmb0R TW79lj7j/VaWhP+Qyw5w3eHW120YkXhpU4Z0Heh0PCR/R/zszYZj2JGQlqHxhL5EY4mL qWyMiDjHCy66iZqNwzJDTEm8Ps7VNPgct7DwsbWtUWR5zXsL7TgrkpsbGeL09eMupfh7 EgH8x4K2x69eBOqiV/lh6Gb3wQhK5i178MXdLQyg57tifQCx0u0QF6PyBtYJXhzZDJbC QmBI1pubaHkT9bspzub616r+7wbCvlnfcWzU7WMqttYJjdjgOj7Ztcx+5+P10ca9SOkM LO4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=1ZXB+0PtaF+vG2Eqe2ku2kHYSPF78NFZHwzDIf6uFVo=; fh=ZjS0uLaiJEKcrQSVfTcleY2Dsnt2s7KhzFqzqrh6Yak=; b=quG1zdCCkYMU9yQBl0BiWE/UEEIska74epYk5RXUz+92aiFmSgvS/hC4/5kqQ58Ihk t1vi+y/1tT4HVNASd9jacnvKAdp46NJTyjo+IAijzMNuEUCSZJ07x58r3URNLwTdF4fS nbU0jbp12CFlQOLfrkTcqGv5GxToK2QMB2IKfTBCgadPPgp5rlqARc86IrfQ2LNBi4JR vY6fyCxYniV9c8Kon8HhIUsC6eOKStYuVkrlHG8h8Z/ThIXicKLzfU3gJdWXzuwYCdf/ lagyZPWL0fo+B49c4BN4tzl5p+Jvuam5EgP5I2Shc0HQvbW5vxUDoMcBR0Tj49zmUn5N E1cA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ul8dGcy7; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-139552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z10-20020a05640235ca00b0056e31d7953dsi150175edc.155.2024.04.10.16.58.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 16:58:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ul8dGcy7; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-139552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 154B51F23AB2 for ; Wed, 10 Apr 2024 23:58:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EF853FE4B; Wed, 10 Apr 2024 23:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ul8dGcy7" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E7553FB31 for ; Wed, 10 Apr 2024 23:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712793510; cv=none; b=OWUhKg1s+mM2/E3mf/wwinIYOy9lT9K2Q2J0I1vBEMnbH0TOJmvl6NuVwS/5ZK2XFsZI3ZvSHXtDa+oR9W9bZoFVke6nEMlBFFGyH6pVkjUQPKy0WbzBYRxiWTdefT7f/e/IOJdUgQzimsN9eOhJKgtKnI3y1I+pti4NvPBX4fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712793510; c=relaxed/simple; bh=bXItv4HYzVSIBt+RUD5HDA9HqlJYzm+XsjCsyrirxEM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=FubVfCGPB/Xcuu3EXrvWs0OdRYcNuWzx1pj5UBK+lERms1feolcqO7pYKDAuh+GLbfI6sw7AYqbUTAWGC11OKp6/PUkpmHQNVXjZmwYLxB+min0u4Mmt2d7Rbo/Dok5eEzagVgJr1DcsHKhsdfhoDk1LWrACyKPQQxUHAuiMo6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ul8dGcy7; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1e42a6158d5so36955ad.0 for ; Wed, 10 Apr 2024 16:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712793508; x=1713398308; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=1ZXB+0PtaF+vG2Eqe2ku2kHYSPF78NFZHwzDIf6uFVo=; b=ul8dGcy7CrJ4QlBF847S23xeeYmdr1uFniE4EssnJuF9uVlt7XlFWP/5saKY3aGGW6 R/q84JQjdLY84gy2Yu+ZQ6zCcbXvw21T5S/DGqsB8NpeuJXPW59MsqZjy/XzAygRg3FO DBBcBNWAd4ELo87Pj02kig4gcrMCTCo+FYBKF7n6m8I1/hq8MFyInnBIGKI437o+MHRF Gnd16K0fGkceV/fcAMhxNA84MifHHBUF3AQe6/KoL1V4r0IS8vl8ts7kJVWiL8sCrkSy LRhk5QIGmrXzoSMDm5WRzQs+21LKt/dozqUiJjUDTaEeKPpjutitrYmpRn0UFk88ARtF jVKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712793508; x=1713398308; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1ZXB+0PtaF+vG2Eqe2ku2kHYSPF78NFZHwzDIf6uFVo=; b=kkdJdsEMDojP1suzmNizqP0PdEyD/HqBaVeuguB56sidGCBAZKMLFAqYhwmYAr2Ek6 7ePgkHiq6bghTOA2BIzpaBJZFOhrJOjQUBfP2j2mHtmJUs5n6cVRPw9vSpmHWWpGB0e9 +6ZLDE+xj/pxlOVmiUXQ5ApbO/tY7cYCnjPtbSaPIAgnaB96VYMtWLlcIXMsoox5u735 tB64CHNNE81V71F4TfrMkV1z1+hGtNEC52Ps+8Xh9uPV8GJelgaLT/F9pIBqD3B099y6 7SeK2qnPfSsuY41dWp7+jblw1/uz6iuFMBNxxKBXNdyagOc7YnbGaaSCHG9gIOveEf0a IAXg== X-Forwarded-Encrypted: i=1; AJvYcCUAkjMH+fq3qskVlz6fm9V++b0/edXgvDoEwfu1wqywUM45KeVafkQPe+vgLLNBxBDl7BR3Us+jaZiy9gKrqa+21xjifk5skAOMutJ8 X-Gm-Message-State: AOJu0YyIYP1Ugtd1GFQv0PdMF6kjU6qmMg4yPjUBHxwdCECixiuNgF+D X5+kpAmbP6stP+36ddIKCAjllBJ4PMUOHmdBvsZmn1DmFSJR3wDoSOua1WM7vw== X-Received: by 2002:a17:902:e743:b0:1e3:c01d:fb17 with SMTP id p3-20020a170902e74300b001e3c01dfb17mr55118plf.11.1712793508162; Wed, 10 Apr 2024 16:58:28 -0700 (PDT) Received: from [2620:0:1008:15:2d0b:3c67:e0d1:ea8] ([2620:0:1008:15:2d0b:3c67:e0d1:ea8]) by smtp.gmail.com with ESMTPSA id ga18-20020a056a00621200b006edcf5533cesm214863pfb.79.2024.04.10.16.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 16:58:27 -0700 (PDT) Date: Wed, 10 Apr 2024 16:58:26 -0700 (PDT) From: David Rientjes To: Andrew Morton cc: Sourav Panda , corbet@lwn.net, gregkh@linuxfoundation.org, rafael@kernel.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, pasha.tatashin@soleen.com, yosryahmed@google.com, hannes@cmpxchg.org, shakeelb@google.com, kirill.shutemov@linux.intel.com, wangkefeng.wang@huawei.com, adobriyan@gmail.com, Vlastimil Babka , "Liam R. Howlett" , surenb@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , weixugc@google.com Subject: Re: [PATCH v9 1/1] mm: report per-page metadata information In-Reply-To: <20240319143320.d1b1ef7f6fa77b748579ba59@linux-foundation.org> Message-ID: <65b77d3e-d683-1e90-ebb0-5c7758143048@google.com> References: <20240220214558.3377482-1-souravpanda@google.com> <20240220214558.3377482-2-souravpanda@google.com> <20240319143320.d1b1ef7f6fa77b748579ba59@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Tue, 19 Mar 2024, Andrew Morton wrote: > On Tue, 20 Feb 2024 13:45:58 -0800 Sourav Panda wrote: > > > Adds two new per-node fields, namely nr_memmap and nr_memmap_boot, > > to /sys/devices/system/node/nodeN/vmstat and a global Memmap field > > to /proc/meminfo. This information can be used by users to see how > > much memory is being used by per-page metadata, which can vary > > depending on build configuration, machine architecture, and system > > use. > > I yield to no man in my admiration of changelogging but boy, that's a > lot of changelogging. Would it be possible to consolidate the [0/N] > coverletter and the [1/N] changelog into a single thing please? > > > Documentation/filesystems/proc.rst | 3 +++ > > fs/proc/meminfo.c | 4 ++++ > > include/linux/mmzone.h | 4 ++++ > > include/linux/vmstat.h | 4 ++++ > > mm/hugetlb_vmemmap.c | 17 ++++++++++++---- > > mm/mm_init.c | 3 +++ > > mm/page_alloc.c | 1 + > > mm/page_ext.c | 32 +++++++++++++++++++++--------- > > mm/sparse-vmemmap.c | 8 ++++++++ > > mm/sparse.c | 7 ++++++- > > mm/vmstat.c | 26 +++++++++++++++++++++++- > > 11 files changed, 94 insertions(+), 15 deletions(-) > > And yet we offer the users basically no documentation. The new sysfs > file should be documented under Documentation/ABI somewhere and > perhaps we could prepare some more expansive user-facing documentation > elsewhere? > Sourav, is it possible to refresh this series into a v10 on top of the latest upstream kernel with a single condensed changelog that details the current behavior, what extension this is adding, and how it is generally useful? As noted here, the cover letter has great material that discusses the rationale for this change but would be lost if only this patch is merged. So typically the cover letter material gets concatenated into the changelog, but in this case there's a lot of overlap. A single patch that includes a succinct changelog would be awesome. And then the requested documentation in Documentation/ABI either included in the same patch or as a second patch in the series? I don't think the resulting patch series will actually need a cover letter after that, it will be able to stand on its own. > I'd like to hear others' views on the overall usefulness/utility of this > change, please? > Likely true for all hyperscalers, the immediate use case that this could be applied to is to track boot memory overhead and any regression over time (across kernel upgrades, firmware upgrades, etc) that may change the amount of total memory available. We'd want to subtract out the boot overhead that we know about (like struct page here) and then alert on any regression where we're losing memory from reboot to reboot for any reason. This increased visibility into boot memory overhead allows us to create a mechanism to track changes over time when otherwise that attribution of that memory is not available.