From patchwork Sat Feb 18 00:28:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Houghton X-Patchwork-Id: 58856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp148044wrn; Fri, 17 Feb 2023 16:48:20 -0800 (PST) X-Google-Smtp-Source: AK7set+rGYZxp+tg+lSEA6QKQKBFr69tXXeexrkjzAnzZSoc9Z4daBWzXJvGeuH4U07CRvW/9Zp1 X-Received: by 2002:a17:90b:4c07:b0:234:b75c:1847 with SMTP id na7-20020a17090b4c0700b00234b75c1847mr6544910pjb.30.1676681299731; Fri, 17 Feb 2023 16:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676681299; cv=none; d=google.com; s=arc-20160816; b=UM0JVMgUTirAwc9n2IkngVWV7HCs/dkXpwA7w09p9YvsBm5+Ugnk6R211Q3ICRAbIl Bo3J3/CBNJohMegtHVWyhbKGOKquNJamES4IaMYSlHyuzcAPJXlfW9gEB38mKMy40mc3 b0dQZLb9u+tFy6MxEq4/S6bIBnJ5xvkjqXOkBWfnZKvdQbXNxlpvpu1Ukq5M1VgiqCAU 57+4cHt9R8W1JwkRPmQiBKBKTCc8uAIeAN4Tp2zRqlcYkVKn+9dy4fontP9EaxL0lfss ExN2SAA9/eezsg6C+1ChZb+75Wd0KV0psv7CAjfKEVbH+CH01VOUXLXg9eP5Julb8h9N cPTA== 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=rVcqYSKj99pGLWaPkurlgRpM4dq8t04RSFrIu2L3zgA=; b=ggYAzqHoszTu5IpAocQqKLbNbeyDhtdo6LQnchCbC6ZpKXsTwx/D82U1mIPesgPI9J m1pU6l2o4RiDAKG2PPsv+e2LUEgIDVY6/IHVvT+SWFh301ZxYneNrjDEW2WdGEprZHHp Jij9st8gNGI5E3uKSlXIhdX0PHnYtcAmeTTKzpExYWIpXYzzd3G2n4IORFsOeIFC1dcx CmqQH+C/dMq00d1u0THITdkwaXG7+dhdXDfUD03bsnpp3QqC+cN60V6GBnubKOn7sjTI dY3wZcT+kQDSraOxLr//AulfG+HaXtx85OGbrtjupJnYE1Q6gRcvzO0sc0e4GZwkC8X8 BB5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=q4c+hojX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a17090a194c00b0022c5524d76dsi3622430pjh.24.2023.02.17.16.48.07; Fri, 17 Feb 2023 16:48:19 -0800 (PST) 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=q4c+hojX; 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 S230338AbjBRAb7 (ORCPT + 99 others); Fri, 17 Feb 2023 19:31:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjBRAbW (ORCPT ); Fri, 17 Feb 2023 19:31:22 -0500 Received: from mail-vk1-xa49.google.com (mail-vk1-xa49.google.com [IPv6:2607:f8b0:4864:20::a49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D4E36D25F for ; Fri, 17 Feb 2023 16:29:55 -0800 (PST) Received: by mail-vk1-xa49.google.com with SMTP id o73-20020a1f414c000000b0040163d749ecso646898vka.11 for ; Fri, 17 Feb 2023 16:29:55 -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=rVcqYSKj99pGLWaPkurlgRpM4dq8t04RSFrIu2L3zgA=; b=q4c+hojX4+dTZygB2Tks0txtgbVxj7x8TKkFZ4tMc+sqQf6GeN73tsvcqCiW02hDp4 8XPu7pKfyuoWyWf0l6efa5Zl8QTeR0XBVVaGrv+Wd9WG+jAQtWkF9yUFkUA6luQj+6cl jVGauOVy3CkA+wV1fgTRQ99Wfw3xgg3rfIr1+mhVfMwPBkQ+w4aIyIAy3UP92Sz6TP2b rQ4LOt/rb25Xw9+JRDlRHS/Ym0me/mMiwA3HH1eYVYoYEY9NAXA/3czNh8h0WNs5P9nw XagFyrun6V7H5uqPSe2BtAfdYCj11o7oZZljG6RocZ2iOY2K7t3KE+FE2jG7TajzTzWr Fm/Q== 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=rVcqYSKj99pGLWaPkurlgRpM4dq8t04RSFrIu2L3zgA=; b=pjf/EGM78TOgMpolN8znEAxniik47ZXYh5R5s/capKMnFXX/Q3WNp8/9OwTLD63mQP Q2LrDR27bc/XpMxZe6U5HZv3oMOFpOjUE8HNmB0QiLKMgrvGWYrtWV1mpwpJFH+vVN9m uwQJm74HVJhwFmrgUbQ+hSSbl3yhhSV2/o9UtOJQ3zCLx3tFKJlJmj5JJWcc3hy1YaXq b65RDP6sm43bE3gUoUALCtwNuUEhRRJ3v3+fOTCPYdPZKmS+xSy03O4H7jdrgn8Cn406 q2nuyToL8vegjh3IxWAV4K+l6s/JBrF2qT7oEVgEaA8nKrasx2VCjqqBiazdKH9lddKT gwLg== X-Gm-Message-State: AO0yUKX17HODU8+NeSdCcMejTk5b3+rDJVdm65o8wQvE5HesSQhJEaRr n9KyYfRvneJ4nZ1BNNTVQgj2i+WSWqTmQbnZ X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:ab0:100c:0:b0:68b:9eed:1c7d with SMTP id f12-20020ab0100c000000b0068b9eed1c7dmr77489uab.0.1676680165444; Fri, 17 Feb 2023 16:29:25 -0800 (PST) Date: Sat, 18 Feb 2023 00:28:14 +0000 In-Reply-To: <20230218002819.1486479-1-jthoughton@google.com> Mime-Version: 1.0 References: <20230218002819.1486479-1-jthoughton@google.com> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Message-ID: <20230218002819.1486479-42-jthoughton@google.com> Subject: [PATCH v2 41/46] docs: proc: include information about HugeTLB HGM From: James Houghton To: Mike Kravetz , Muchun Song , Peter Xu , Andrew Morton 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 , Frank van der Linden , Jiaqi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758127770782587543?= X-GMAIL-MSGID: =?utf-8?q?1758127770782587543?= Include the updates that have been made to smaps, specifically, the addition of Hugetlb[Pud,Pmd,Pte]Mapped. Signed-off-by: James Houghton diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index e224b6d5b642..1d2a1cd1fe6a 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" may appear and +show the amount of HugeTLB memory mapped with PUDs, PMDs, and PTEs respectively. +Folded levels won't appear. 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