Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp809955rdb; Thu, 15 Feb 2024 16:55:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJD+xSwg4GbM97xIaxa0Oedd0wJOCRZUVvLZPVIN1aFYn1xciyIllhmrBSuNN5OwE30AYoA8l42dbr54ym84swowuOMmeNOeOgn9dPdg== X-Google-Smtp-Source: AGHT+IHFPdP4jrByO5w+ro55Tt6AWLeyD8gg11l2TIvmanGlOUY14opwFWRdQ5/AdTmqiohsxITD X-Received: by 2002:a2e:8415:0:b0:2d0:d42f:30b0 with SMTP id z21-20020a2e8415000000b002d0d42f30b0mr2099945ljg.33.1708044917090; Thu, 15 Feb 2024 16:55:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708044917; cv=pass; d=google.com; s=arc-20160816; b=iNb9r0Q/YF0iHkW5bpr57hgMos14Tw9p4W2CH0ZGrRG488AIawo65DdcOpVjsJOSs4 WuApsbMCtDiHFD4wopl9NY4ZyKXu8iba83ojcJ/jPYXzaJDi8AWq6x3Wjduxq1iWYLaq 7IOd8jNno1P6pVFSilbvh3DjVzPckpwFKIfLinl/yxCqsD/389NA9lZpUtRnTyqjvVcn TviqHjPdi0yRFL2O+wuWTER/3e5XrZsjat1knXmgKd5DY8mIXhHpq1klQPKTnNNns1LE XuGVVD0mjuLY8BGZwojkQtTnV0Ng8Zi65m662MVixkdIlOlywmHvBj1OJgQlyZOLGdLd luJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=2xy53qgS2iJInA/5BDMVhpj6cwRaWAAd3dI3MMe55Gw=; fh=86+glB17cF2CB4+9ZLfgYkP7OmQS4mMkkGL7UZVcS4w=; b=oU8G7YIV4FYwYAoLvNVYmTSlaSAiABrn7+UAOM4pxyvh0Yh3JHEAwC02ZXiuXdgRYF eptyJjw68qAWswfkRZlBt+1cHHDve5uV1qhMVOxKY6eoJvrOsPNpgCKpdL99j/7zkWzj 9wYQfq4CnduzAaBnAurCvi/PycP6+QspyPXPJ5o0ivZ2Ak0khm4oGMajK5I1rm/cF06X 7jnzSgHRXW9HrmuEmvzWcT4Q3RyZB6lvE1HEDBcelkmRk0VTGQ8k8KMY/joODnhZhIi+ XKcjoq3l1qXLcfNKhc+yK/OersLDdMt6qiYu4+pnmyxfODkzPcM2E+RKqZ5KDleT3PRR pD2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=oprrFOsq; arc=pass (i=1 spf=pass spfdomain=soleen.com dkim=pass dkdomain=soleen-com.20230601.gappssmtp.com dmarc=pass fromdomain=soleen.com); spf=pass (google.com: domain of linux-kernel+bounces-67912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67912-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=soleen.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q9-20020a50c349000000b00563cc313c70si578786edb.214.2024.02.15.16.55.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=oprrFOsq; arc=pass (i=1 spf=pass spfdomain=soleen.com dkim=pass dkdomain=soleen-com.20230601.gappssmtp.com dmarc=pass fromdomain=soleen.com); spf=pass (google.com: domain of linux-kernel+bounces-67912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67912-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=soleen.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 C780F1F21F62 for ; Fri, 16 Feb 2024 00:55:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DACCA13AEE; Fri, 16 Feb 2024 00:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen-com.20230601.gappssmtp.com header.i=@soleen-com.20230601.gappssmtp.com header.b="oprrFOsq" Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 4CEC0134A4 for ; Fri, 16 Feb 2024 00:52:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708044737; cv=none; b=q3HmGgAid4to/KIyZJNx2GwP+KzzKKDc4Grc56ZSVibJrTv5Ja2feQI3325L8763HKXTIRu066gPnrnf0XsKeTkS2EfF0L8Bz8qE6mlSlo5yXTH5WVKau2U7JxvkoNOJu63Kgtn+ouirPBs+Wr/PGjnUEOcfGchZ8uUzF6F2uvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708044737; c=relaxed/simple; bh=2xy53qgS2iJInA/5BDMVhpj6cwRaWAAd3dI3MMe55Gw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qMdE7SKwaDDDDZa/yIDpbSP7t0QJqSJ0afqZG2fEM3W4jBY6zIkv891zhJUX2XpITLYC8UkS2SQh5HBrVDvls/KVsQssw22QcFTJtT+fR7Igh6f2DTCaY1U8rttFzxb6HLqRe+fy0Rhj/NnnIgXizDIYwcra5k0wRWF16Jb+Sic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen-com.20230601.gappssmtp.com header.i=@soleen-com.20230601.gappssmtp.com header.b=oprrFOsq; arc=none smtp.client-ip=209.85.219.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dcbd1d4904dso1580259276.3 for ; Thu, 15 Feb 2024 16:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen-com.20230601.gappssmtp.com; s=20230601; t=1708044734; x=1708649534; 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=2xy53qgS2iJInA/5BDMVhpj6cwRaWAAd3dI3MMe55Gw=; b=oprrFOsqJykOmX8zng1ggw/imPDsjP6LsR952+nWuOFcMP55GT6qRXSMZ7iao+wvx3 WyWo8YOFsZFcykfBc1fpkddIvOIefHY1ew5KhnSwVRbl0cuQLLSe2hdNkrClwNbFQdVz ZLLHM901XdhT4Wg0hIMGbVvRCJ7bKVT3BqIkl0n5fsUs2C3jqqmp3uhy74PniTQ/fnB4 09z3O1C7oi7SXImOFm4B0yvnXfwRFQgvrfLhybhp6hzEyv9sucLkYc3h2hQ7+5nYH3RQ xYNOPi4ApnHeUeQNFx/EtYkBrvJMgwZCb+L5Hneoiu4xvljcPp8wH4LVfLea0q6ClKQx pMkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708044734; x=1708649534; 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=2xy53qgS2iJInA/5BDMVhpj6cwRaWAAd3dI3MMe55Gw=; b=D4+zcUuKSuW/lbWMAnQ/U6HWg2LlA+FVOrL2v64GPuEV3e4Gaw8m5KUjdsPEh9AT7j GsaB0/cZtLDTq1ZTs9oMrJ+zT9G5oNsTdaTtrqmlPVU1zQL6vljTL3R10E2abRNxRss1 sk6z0fvOgQIx8/coEFdo5EHyuGZaHHVIGMmevA6gKH8oZoaDtN++j2H6mV4Dr6Lvl5eb 1gEZdParCfAHjKaMkAUSd3Ny7efNMKedI9XcCYz5ZolljKs7q4FLXAwvrg5uJed29yMG h7hemrzl6DwPlV4uDgJn4iRNNvzmoyXd3Al/q9WrZ/XvBLjDyWLYSOislcBr9ihZZFDF pYaA== X-Forwarded-Encrypted: i=1; AJvYcCXlpiWfhZNZSmm1Vw/sWztKrM6zMg/b7JBVJI3zVu+vbm3nxkS3KDRzTDHzGLoA/r3YOddSbrF8ob2cq/MrwQWfUektSCtswSvoC4cZ X-Gm-Message-State: AOJu0Yy/qnfvcSUaAsiGOCC9GXk618zD4NV/Ob7Y1o9SJFLGg4edtGo+ ZLZBgaZFC3m4ixVRpDcfOjmQf8Ru0/ghqasWfCHFnHgqnYOlbLif3NOoFTvet3B9Jvd5Nxry8TV 8vpttpnI3xOFA7ZrkMSkNMinupN4/xwZQjpuIIg== X-Received: by 2002:a25:ae85:0:b0:dc7:4671:8ae8 with SMTP id b5-20020a25ae85000000b00dc746718ae8mr2779603ybj.65.1708044734239; Thu, 15 Feb 2024 16:52:14 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240214225741.403783-1-souravpanda@google.com> <20240214225741.403783-2-souravpanda@google.com> <20240215161441.c8a2350a61f6929c0dbe9e7b@linux-foundation.org> In-Reply-To: From: Pasha Tatashin Date: Thu, 15 Feb 2024 19:51:37 -0500 Message-ID: Subject: Re: [PATCH v8 1/1] mm: report per-page metadata information To: Suren Baghdasaryan Cc: Andrew Morton , 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, 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, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 7:40=E2=80=AFPM Suren Baghdasaryan wrote: > > On Thu, Feb 15, 2024 at 4:14=E2=80=AFPM Andrew Morton wrote: > > > > On Wed, 14 Feb 2024 14:57:40 -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. > > > > Would this information be available by the proposed memory > > allocation profiling? > > Well, not without jumping through the hoops. You would need to find > the places in the source code where all this matadata is allocated and > find the appropriate records inside /proc/allocinfo file. Another difference is that memory allocation profiling does not report memblock allocated memory, this patch reports the amount of per-page metadata allocated by the memblock allocator in addition to various paths that are used to allocate per-page metdata after the buddy allocator is initialized. Also, the memory profiling has page_ext overhead, so it is not practical to unconditionally enable it throughout the fleet. Pasha