Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp481972rdb; Thu, 2 Nov 2023 09:03:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqsE3/YbkJYUhO2xeeMLGNIveNGL/ZPXf2WJJ6NMwEJtQV9shzx10xXCiMYxtsHjNtCm6v X-Received: by 2002:a05:6a21:790b:b0:181:125:e85c with SMTP id bg11-20020a056a21790b00b001810125e85cmr9277004pzc.53.1698941005043; Thu, 02 Nov 2023 09:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698941005; cv=none; d=google.com; s=arc-20160816; b=SVMQB0ipPyNh6F1QFkpkohGCgKQLF/Ditv/oDktopxGwBYUmY5fWSWOilw2s/Rfa8S gbM2EUNEXn7Kag+AjxoINzbRdxZmIR34X9cE3xmdpcBRZlkD2W2NW1SfRykL9zLrPLo0 Mnp6jjbgvrZ5v5aHktmML6e/zlGgSPOty54MxImkGdJnRESqghcVR0yKpXxU9mZDnFow 1V8DPn94EsGmgexANlhzbyB3G2EWb6hCz2lJgqA0LzBMy/aarmiSiw6vBTBhqMcHDJnh qKRfBtPSBaK8EF7neTieOCTtbdSBu6M5Dk3UxB2wRFV99jwJGLBFjlUwu4n4A0wWNd2s ivhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ALiAo4buXiADi7F2Q23wsqEzCK2Th70JCnzOvrzRQhs=; fh=XRDe1R8iQ+qEzQZhXDLyDi6ZJ8qKUzD+V01LhzDk9ao=; b=S7LUugFy+TbC36WCQy1IZo+fGq61UaJS5TgALCU3LbA18qNuTkNOT0KBZ7Tib8gYcj JqlpI2RDr23LnXmhLdeW+RUJ6M7SaM+JJbnESwSFO0XrWwlthYkTK7krHMkppJmoVwFF sG7lyDaolfIRP2bCn9NoaBXCpFPRwrvPTpDrtStiDLnOz+PtsMwasLHtSMsUp5VZbIgH aCxNUkfi24Y1DixTmQfV54I66EWkYnBatp5e002nfTRF75Da3zKUPZSLVeTp7pZQcADi sl/piJOdeNNENVHMx2uB5aQbX6TK/T9xI7bpB3b7bSSgwyXKVWhxPOhUj5d/WuXgScla QCfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=G1G9RzlE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w63-20020a638242000000b005b896ecd1efsi2057785pgd.172.2023.11.02.09.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 09:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=G1G9RzlE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 19624827FFA6; Thu, 2 Nov 2023 09:03:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbjKBQDX (ORCPT + 99 others); Thu, 2 Nov 2023 12:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjKBQDW (ORCPT ); Thu, 2 Nov 2023 12:03:22 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A305212D for ; Thu, 2 Nov 2023 09:03:12 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-41cba6e8e65so5888451cf.2 for ; Thu, 02 Nov 2023 09:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1698940992; x=1699545792; darn=vger.kernel.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=ALiAo4buXiADi7F2Q23wsqEzCK2Th70JCnzOvrzRQhs=; b=G1G9RzlEVFtuWAUXMau2IDMfe+NnVJ/jE3pIjlRkzfsY6B6SnjamUd2O10qx84R58V +SL9lrlxTWuXejQ6IwZckAt2g0JHrxdn4BCH3cR0j6E/MwbXwekiappHxlWOvQM2KEDL myhsbRbKEaRmjLqfZkujbuJQ4T24AESRvJrx12EyBNJxuJ9G2CCuuRGRbSQn4wKaX9fp SH/58QjSIBpa4RvdSdbg84kd8TZDQ7m7/+/1WDNDF8zSNBvo0OiphVUhzB4fbJBULvXg he2eVtWnMvJWJr1t2hB9BWkSV60cJRCda+hEYNl/rbm4YaoKoTSk4Z6M5b/PfWaA13I7 3MVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698940992; x=1699545792; 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=ALiAo4buXiADi7F2Q23wsqEzCK2Th70JCnzOvrzRQhs=; b=nwU+G/+vOuVCqlTWYfejhTOmREDCoh+J6bDhZ7Apsnq/4y1YQ4bC59NcO6O+5uoEq0 NurK0wgk17MxBMgmnQCt6T5y5macAHeq3kVMv0uKAxd6oXPBaBBYV2uZAElw228bK4Vc 7DYyfk+oYUHx1vqR1zbYqFCZErlp9v0PNk4tQgl8QgG4RDD5WVuBFg70r6xVHaHBoFzp JjhcmWSY7fWHFnZPdalQFreHtBvhI7iu5ys4HFweJBpmB1GJbRsWq3f7Yvksr/2PDY2u Po0uEmksmDb/Q9JyN17q3pM0303ImEJz8yOq+fRFt26QWXs0MlKyLD+Ax2reWftcp7q8 Lp4g== X-Gm-Message-State: AOJu0YzIMVIUWuP/N7p2udJrcctkDsZHmy9YYWhRjYsgFc9ylH/gMdvq gW+qUWAHqp0e+/W6l86oW/c2pc3IoXLd6OsxZh6GKg== X-Received: by 2002:a05:622a:1a16:b0:41e:280d:4e28 with SMTP id f22-20020a05622a1a1600b0041e280d4e28mr23844567qtb.40.1698940991420; Thu, 02 Nov 2023 09:03:11 -0700 (PDT) MIME-Version: 1.0 References: <20231101230816.1459373-1-souravpanda@google.com> <20231101230816.1459373-2-souravpanda@google.com> <1e99ff39-b1cf-48b8-8b6d-ba5391e00db5@redhat.com> <025ef794-91a9-4f0c-9eb6-b0a4856fa10a@redhat.com> In-Reply-To: <025ef794-91a9-4f0c-9eb6-b0a4856fa10a@redhat.com> From: Pasha Tatashin Date: Thu, 2 Nov 2023 12:02:34 -0400 Message-ID: Subject: Re: [PATCH v5 1/1] mm: report per-page metadata information To: David Hildenbrand Cc: Wei Xu , Sourav Panda , corbet@lwn.net, gregkh@linuxfoundation.org, rafael@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, muchun.song@linux.dev, rppt@kernel.org, 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, Greg Thelen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 09:03:24 -0700 (PDT) On Thu, Nov 2, 2023 at 11:53=E2=80=AFAM David Hildenbrand wrote: > > On 02.11.23 16:50, Pasha Tatashin wrote: > >>> Adding reserved memory to MemTotal is a cleaner approach IMO as well. > >>> But it changes the semantics of MemTotal, which may have compatibilit= y > >>> issues. > >> > >> I object. > > > > Could you please elaborate what you object (and why): you object that > > it will have compatibility issues, or you object to include memblock > > reserves into MemTotal? > > Sorry, I object to changing the semantics of MemTotal. MemTotal is > traditionally the memory managed by the buddy, not all memory in the > system. I know people/scripts that are relying on that [although it's > been source of confusion a couple of times]. What if one day we change so that struct pages are allocated from buddy allocator (i.e. allocate deferred struct pages from buddy) will it break those MemTotal scripts? What if the size of struct pages changes significantly, but the overhead will come from other metadata (i.e. memdesc) will that break those scripts? I feel like struct page memory should really be included into MemTotal, otherwise we will have this struggle in the future when we try to optimize struct page memory.