Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3010053rwi; Fri, 21 Oct 2022 10:20:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4buuSYVBmMQ2drhLsKBy4xgr9eYEu/964cjA4hZMhQhG86beuf5VEO2Wgegcl4qJ9AmkF4 X-Received: by 2002:a17:907:743:b0:740:ef93:2ffc with SMTP id xc3-20020a170907074300b00740ef932ffcmr16883772ejb.514.1666372849356; Fri, 21 Oct 2022 10:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666372849; cv=none; d=google.com; s=arc-20160816; b=IQEwLjDURA8WO6w2VmFyKRz2aMEFplAt3QUxTX8ND/mIUu0lN1qpQ78NAjPbUZoTIn AnxS3w4ela7pUqJgWu6TIEjd8VgwLgrMwzP1ytBJKitaW6fkk+6wPx3v1Xr2lt1/VF5N 63c52PTcWx0uMXXqcaPKjcPOQjxbxO8yI3oq111fToaNcZz4J4cHZwTvRIP8+L3yAr/2 /u3eYYF4BjstShY9jQrZIdQTPnaOLaVRo4+606XHNpGXznoXUQT1grAjWmSQsKSDzEX/ zU0j+BoriVdd1PerGfiROUb75t4YmCwJalvB3RcVXlxCmiaply8V0hjtghM7mqA3fKY0 X+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=TmmajsS+yF0Y+smc9uDIgSrHWhiWWvbw0yNGeqoJ1B4=; b=TZKFt3/4SLDKbY5JUQc1KjpLnyHVbR6K9epM9pgjLpMN3TCSQx0GN4yWUbeexCf33U IHFIQdXWqb+3EiR8DOpwkq3rD+FzbdVMXX7XACfzNzDtDGQa5l41YxrYhNLo4hCUK6Xd gb/bv805ca4CDTjbaL0N0NOMCnYFiFEXi7XD+Rp4LGDBmzgrJ/2n2LouDv/pTZDdootj 02/41KK+QMCYEPxcdpetx5/beACLnY7IP2JAi587tkEr9h3mlvVo0Ey2jjxMr8Ocf9gs SAlaJzgxKtC/plW4l24+hoPxnqXUSd7kmXszIGkmAkteJua8wAbI2SuiqsoDPOQB+TRc X7aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="k/CWTQ2S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k5-20020a170906578500b0078a19032c70si18460462ejq.334.2022.10.21.10.20.24; Fri, 21 Oct 2022 10:20:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="k/CWTQ2S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbiJUQlL (ORCPT + 99 others); Fri, 21 Oct 2022 12:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231350AbiJUQjY (ORCPT ); Fri, 21 Oct 2022 12:39:24 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19F6828B1BD for ; Fri, 21 Oct 2022 09:37:57 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-360b9418f64so34092477b3.7 for ; Fri, 21 Oct 2022 09:37:57 -0700 (PDT) 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=TmmajsS+yF0Y+smc9uDIgSrHWhiWWvbw0yNGeqoJ1B4=; b=k/CWTQ2SpQJfccU+Jmu5n5m3XKwNOcn09ydVormKK4vMumeUdIUvjCVCl5GIZ9SIyh C7Inn0LyzhxsNSOMjm/4020a5BNYgiNEhy78qAvhW1Twuq2iFbHu60cGARKIabVVIokR utHTdzZJsAzCrzV4+3TLa3tG7Ervq6FCIxHIVfY86Qt7eoS/8UiFf/E6EZGcJbnBuQHC zZp90iS8OmSktGOr/SeHXA0/BixmjPhSHK2BJ4SArbN3ZuBM6g0pEG45aPZ9TlAcsNeA Wt8tZXRb5+asexv88RaTMkaItUpev6DjCp9jt/Dnh6ebstfYDAyaIV6Q4tpqhyYhq9jK 6mNQ== 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=TmmajsS+yF0Y+smc9uDIgSrHWhiWWvbw0yNGeqoJ1B4=; b=Z9r5svrNp7mcxN6GccCzeATb4v7s4PxpKarJDM2Yq8Ery8rfKlgGUo9PB++S0PIqp8 3db6gpzjzgr9fuUi6ewcfIaGKvIu+R9t2IgHefqs7bYdNhltJ/C39fHyEIOmN+knfEdV 4G589b+TDJz+vpQjmdrwmt5rvREhqWNzjeJv//mmYPSanJ1+nVcZJLjoGogcWdFLJY+k V881JSuM222Rr9lzdaCSN/tNMoAnCcib1ERmyEXTjkIps5VkWSgexeaNyrRjPwks630n IJ2Ye4aU91Ngj/CqR8d0ASOADuPGUlpoG72YlrAQgcX8M4nDELvwiMdoBuy3GVNMO8O0 /Djw== X-Gm-Message-State: ACrzQf0Pdg5mWB4L1e6ED5YtR1oFGZBYfO2/dK+1O3OJcH6+XT0j6ecM i1Cjx+DWAosrV/NcsknbwsQGxYjTMbe5VqKs X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a81:1aca:0:b0:35f:1d9e:fbc8 with SMTP id a193-20020a811aca000000b0035f1d9efbc8mr17306594ywa.261.1666370275936; Fri, 21 Oct 2022 09:37:55 -0700 (PDT) Date: Fri, 21 Oct 2022 16:36:58 +0000 In-Reply-To: <20221021163703.3218176-1-jthoughton@google.com> Mime-Version: 1.0 References: <20221021163703.3218176-1-jthoughton@google.com> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog Message-ID: <20221021163703.3218176-43-jthoughton@google.com> Subject: [RFC PATCH v2 42/47] 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham 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 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 ec6cfdf1796a..807d6c0694c2 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -444,29 +444,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 @@ -507,10 +510,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 -- 2.38.0.135.g90850a2211-goog