From patchwork Thu Jan 5 10:18:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Houghton X-Patchwork-Id: 13089674 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 C155BC3DA7A for ; Thu, 5 Jan 2023 10:19:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9927F940021; Thu, 5 Jan 2023 05:19:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F545940008; Thu, 5 Jan 2023 05:19:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 683A3940021; Thu, 5 Jan 2023 05:19:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5782C940008 for ; Thu, 5 Jan 2023 05:19:56 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 3D5EE1C6505 for ; Thu, 5 Jan 2023 10:19:56 +0000 (UTC) X-FDA: 80320349592.11.7F803C8 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf11.hostedemail.com (Postfix) with ESMTP id AE10A4000A for ; Thu, 5 Jan 2023 10:19:54 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BGsOO1Xa; spf=pass (imf11.hostedemail.com: domain of 3SaS2YwoKCJA3D18E01D8708805y.w86527EH-664Fuw4.8B0@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3SaS2YwoKCJA3D18E01D8708805y.w86527EH-664Fuw4.8B0@flex--jthoughton.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672913994; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=99zyT64KwIVcKcOLonOKX5TPwNAFDbPGP6/roR2wJeg=; b=Qqnh4lDan+I+SSZB2BWq5J2uZN1hGQTe3VLdo1v0PDl+G1f2RNlda1zXH7Apry/72MiJvt ytd2wQZdu1cjjLxtTbkOt73qmHmk/4fYdtEqJ00ZY11H5ymoAA1zZi85LEuTr/qXwWBPKG DZeL2jl44Zop7G0NKUsvJCOWYA3D+UE= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BGsOO1Xa; spf=pass (imf11.hostedemail.com: domain of 3SaS2YwoKCJA3D18E01D8708805y.w86527EH-664Fuw4.8B0@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3SaS2YwoKCJA3D18E01D8708805y.w86527EH-664Fuw4.8B0@flex--jthoughton.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672913994; a=rsa-sha256; cv=none; b=zBJtwq1iayTaioUj/OcBWk8ZqDowL3Of1/p+AfQVp9USOyiZPfLX8oro+UOJJ9rpZ4WWu0 BFI8iv4zoo/i6MoRPWZtElJ5ixgLCFmNIQNa+c79js2Xtm/4o5JNUFSEvFLJb/nQjij8+/ cjTT8UcKkGSO+CAviUp+7dMhCSS4tSU= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-4597b0ff5e9so375015377b3.10 for ; Thu, 05 Jan 2023 02:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=99zyT64KwIVcKcOLonOKX5TPwNAFDbPGP6/roR2wJeg=; b=BGsOO1Xac220ouarsldL8eKmYhPBMh3Wgm0XdhF2qRYBawDIEYWKUm1fx3k2kI0tO3 6haBYEyU52usmxK/1mMxlgVirWHauUoqjfTmpqfD8C4NnA9XgvhoFikpqHngC1fco9V7 S+UlF+nVqFxP0rGL7Ey8oAS/AXZi5EU2c143l7lqDwLU7BB+WKAdEjqfM7TPqkG2EeyJ uasY9UGaoogWW9/VJti+da2o1nbNCj584CdLWxHWuI/cw3xKS8dYTTiOo6VECuB/GmOW 1BhWMy0g/FBHeLD+VAxCyqfvElw8RGe86lYpIg6QfrQJ1bwD+NpCsEMEh5dkAuTWPcaJ K9jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=99zyT64KwIVcKcOLonOKX5TPwNAFDbPGP6/roR2wJeg=; b=HHfcD68Fziy5Pvi6VaxxmulNgYfF8tuxarKDLgusO0Lij3DYhEwhm0R75HE6TGBaQJ hthuP0/4VLugoF9HDdN1vk0vROmksohflb7abKq5R6FNXIOjcXGS0e6MIRmch4mUWkEs YRZvVJHgDc8nr0SHLM8RhLX3e4owPZ1aFvLaIPcMp9a60m7dn6Nljm+1DFqlR5aaiVUs R51HDPtZesuwLOOu4o8d6S41z9WSQpZGp5ERN6SN3z9NZQbQFDl0hsCRb7BY7XiZmY50 zDwySDdMSjcTO6xyWSnRWgXXBTkxgttVBwY0FluHAiGe+b8FirB0tnyaOLuF4nLxST93 3UoQ== X-Gm-Message-State: AFqh2ko/xvOxLX3HFUcLtgU8eVcV60ShWSG9sj5POK9YclN8rqsb3f0q k85z7fBLKQYPx7xk+EEGhZuaf4EaDwL99Ui0 X-Google-Smtp-Source: AMrXdXvsBqG28GRMWBm56GtDbnxmt0iS/OB8Uv+tWQOADD6vpQwS1iuiPqZuiNCSbnQC4jMgqN7qExiWxrGFRxIC X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a25:3146:0:b0:6fb:80c:fe0f with SMTP id x67-20020a253146000000b006fb080cfe0fmr4203995ybx.25.1672913993943; Thu, 05 Jan 2023 02:19:53 -0800 (PST) Date: Thu, 5 Jan 2023 10:18:39 +0000 In-Reply-To: <20230105101844.1893104-1-jthoughton@google.com> Mime-Version: 1.0 References: <20230105101844.1893104-1-jthoughton@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20230105101844.1893104-42-jthoughton@google.com> Subject: [PATCH 41/46] docs: proc: include information about HugeTLB HGM From: James Houghton To: Mike Kravetz , Muchun Song , Peter Xu Cc: David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , "Zach O'Keefe" , Manish Mishra , Naoya Horiguchi , "Dr . David Alan Gilbert" , "Matthew Wilcox (Oracle)" , Vlastimil Babka , Baolin Wang , Miaohe Lin , Yang Shi , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton X-Rspamd-Queue-Id: AE10A4000A X-Stat-Signature: aepec7gkfedoxhmikqwdik1hhj9s8k8o X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1672913994-716103 X-HE-Meta: U2FsdGVkX1/wmVOJfjai8MKY2JuyJSV4jjyhkFvgMis1WJ+y+wk28I9H1P7rN0ljur/yyvIFSgp/tFYpYpK7uF2mExgJvWoXZie46f9wTurJjGDA08vgBp4lwikskSgsQa/oU00JX6PmGm1TLt9UTYR1JDXHaBcj3/z9OvXc5tu90xxXxSxyPKtTIi/lqkgZZ21I9y0bK9mXAS2aezs8171Q6rdivpkDzJXbAeGD/c0LuURYPHBaeza6hGn2J5+0MI7S7A3C11NjACi0Q8JmoMVBqAPzR8b37WvWU0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Yx/gjg1sI9FJrGiCI= 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: This includes the updates that have been made to smaps, specifically, the addition of Hugetlb[Pud,Pmd,Pte]Mapped. Signed-off-by: James Houghton --- Documentation/filesystems/proc.rst | 56 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index e224b6d5b642..1fbb1310cea1 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -447,29 +447,32 @@ Memory Area, or VMA) there is a series of lines such as the following:: 08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash - Size: 1084 kB - KernelPageSize: 4 kB - MMUPageSize: 4 kB - Rss: 892 kB - Pss: 374 kB - Pss_Dirty: 0 kB - Shared_Clean: 892 kB - Shared_Dirty: 0 kB - Private_Clean: 0 kB - Private_Dirty: 0 kB - Referenced: 892 kB - Anonymous: 0 kB - LazyFree: 0 kB - AnonHugePages: 0 kB - ShmemPmdMapped: 0 kB - Shared_Hugetlb: 0 kB - Private_Hugetlb: 0 kB - Swap: 0 kB - SwapPss: 0 kB - KernelPageSize: 4 kB - MMUPageSize: 4 kB - Locked: 0 kB - THPeligible: 0 + Size: 1084 kB + KernelPageSize: 4 kB + MMUPageSize: 4 kB + Rss: 892 kB + Pss: 374 kB + Pss_Dirty: 0 kB + Shared_Clean: 892 kB + Shared_Dirty: 0 kB + Private_Clean: 0 kB + Private_Dirty: 0 kB + Referenced: 892 kB + Anonymous: 0 kB + LazyFree: 0 kB + AnonHugePages: 0 kB + ShmemPmdMapped: 0 kB + Shared_Hugetlb: 0 kB + Private_Hugetlb: 0 kB + HugetlbPudMapped: 0 kB + HugetlbPmdMapped: 0 kB + HugetlbPteMapped: 0 kB + Swap: 0 kB + SwapPss: 0 kB + KernelPageSize: 4 kB + MMUPageSize: 4 kB + Locked: 0 kB + THPeligible: 0 VmFlags: rd ex mr mw me dw The first of these lines shows the same information as is displayed for the @@ -510,10 +513,15 @@ implementation. If this is not desirable please file a bug report. "ShmemPmdMapped" shows the ammount of shared (shmem/tmpfs) memory backed by huge pages. -"Shared_Hugetlb" and "Private_Hugetlb" show the ammounts of memory backed by +"Shared_Hugetlb" and "Private_Hugetlb" show the amounts of memory backed by hugetlbfs page which is *not* counted in "RSS" or "PSS" field for historical reasons. And these are not included in {Shared,Private}_{Clean,Dirty} field. +If the kernel was compiled with ``CONFIG_HUGETLB_HIGH_GRANULARITY_MAPPING``, +"HugetlbPudMapped", "HugetlbPmdMapped", and "HugetlbPteMapped" will appear and +show the amount of HugeTLB memory mapped with PUDs, PMDs, and PTEs respectively. +See Documentation/admin-guide/mm/hugetlbpage.rst. + "Swap" shows how much would-be-anonymous memory is also used, but out on swap. For shmem mappings, "Swap" includes also the size of the mapped (and not