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: 13145407 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 BD62EC64ED6 for ; Sat, 18 Feb 2023 00:29:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6125D280002; Fri, 17 Feb 2023 19:29:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BC7B280027; Fri, 17 Feb 2023 19:29:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D291280026; Fri, 17 Feb 2023 19:29:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 10C6C280002 for ; Fri, 17 Feb 2023 19:29:28 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E4EE41C5F4C for ; Sat, 18 Feb 2023 00:29:27 +0000 (UTC) X-FDA: 80478528774.26.4E7027B Received: from mail-vk1-f201.google.com (mail-vk1-f201.google.com [209.85.221.201]) by imf12.hostedemail.com (Postfix) with ESMTP id 3EAC840002 for ; Sat, 18 Feb 2023 00:29:26 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=q4c+hojX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of 35RvwYwoKCAQnxlsyklxsrksskpi.gsqpmry1-qqozego.svk@flex--jthoughton.bounces.google.com designates 209.85.221.201 as permitted sender) smtp.mailfrom=35RvwYwoKCAQnxlsyklxsrksskpi.gsqpmry1-qqozego.svk@flex--jthoughton.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676680166; 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=rVcqYSKj99pGLWaPkurlgRpM4dq8t04RSFrIu2L3zgA=; b=7/AVN67u+yKJmv1DbHlG5xl1mmvx3pgKtGeH5/JFY/Qa9zV1trelOjTz8tmFx/G/CZwDFv Ha6gH5434Y7fL+OqHmxPA345PG375u7VvblXAGzPzMljbnrw+62FXCcCSc1sdlubB/+197 1hqUoig9mqxjdS5EsEcxIar+s/KbHIc= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=q4c+hojX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of 35RvwYwoKCAQnxlsyklxsrksskpi.gsqpmry1-qqozego.svk@flex--jthoughton.bounces.google.com designates 209.85.221.201 as permitted sender) smtp.mailfrom=35RvwYwoKCAQnxlsyklxsrksskpi.gsqpmry1-qqozego.svk@flex--jthoughton.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676680166; a=rsa-sha256; cv=none; b=sIPD1JfqzqeOZfGvbgwU7VFDCNt3yN6coVEwi74017px+OipIEWXsPE56UioRl4fBDDkPx Z5FYaCN6YtzxMmi+ITALb+Yyom6UnFZ7Aolfl6vBAIXrMVEPqA1edoej7BekSpNnr0cDwz fCn8boFtA0x+0xJEXltXtuegHfneMU4= Received: by mail-vk1-f201.google.com with SMTP id p131-20020a1fbf89000000b003ffc9001de6so1107393vkf.8 for ; Fri, 17 Feb 2023 16:29:26 -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=DQTQXfQ04PMmV8sCvGXOOaFCCJJa+b5NueUR28luPLY2QpbmjDEGQMrPY5MyX+hPiI 2P1F4Ed8YUKl/0YRZMVEUzwsJsEvlfa/CrZZsWLpMUBZvL79hEGsrME6MgjSmZzxVD6/ RyzxJKgpE4UwcIcrWSqILuDwv844ExbS2qJEG4BY0blLaQnZNjCcGLgdmkuubRbwJ3cz Hq2G8J3IrQW4S1w3Y16FIS5c6FES2jebl1wrc1dy/j75Z8154+CcSU6rjgh/RI1rIRnN cl5mBG34oJpFZvFdBlMoYRr39sc7O3ZBhxywdy1dczF/KbrrrCxv9FGMmcNYyxy/2NaM w6sQ== X-Gm-Message-State: AO0yUKV/sN9JsRDlBHaIAJhHCpuMjFgJrNwcGgVP1ChoaD2+nUKBD/Zr 2aOtgl8ZvhGbJtXH6m/2chBg1ejbcsnUOHNl X-Google-Smtp-Source: AK7set9Tf2rc8YP45MnilA/p/YM3vrBRBTo5dK3QsJoCd53f/+o/OkfQqN5UhVm88d9/++IMJB7K0rC38dMHYTlb 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-Rspamd-Queue-Id: 3EAC840002 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: cqfj4joupg3h7px9g4ppasijzbef57mp X-HE-Tag: 1676680166-662697 X-HE-Meta: U2FsdGVkX19ZSjjZ745MRi+9LSarani4kO+dMrinNHXATefvUSMfnZZGu4PTDXt0RFWiqumtgKkgvOIvyEywtfG1Ve850aRnEWGy9P+5I22KqyOjlqrM5L2AgTguWRPfbawgJJZVedXNcuMp31InMUvAvSbrGWxAWz7MEcPy3B7gT5XR7XI1udsGCnKIZijh+Nlc9jDNLxztBmdcwhKEf/YiYuqP/ohkSif3PYoTbYwcvOrxU13rdck45/pC7rzHT2kzy6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h1XjvlHJFwg/LnuUYaEgVdQ3PxOv6NnQvhVy3wKjtr7XIV8NJOXyz00yCWgJ3SVVLbk6sXtqXQQ9czWygNOW7dax/VqjTxMIF7sSblma3O3gPjjjdCPdA5QiFUQFTOJy4Z9BaubbSK1v5MGV90apWLPrurwQOj914DALYud9sDxu8O4susQf0C5yGb9seqUJ4ioV7JII86aqR0UA62+5hpv9GMZYynwsyvgOaI24vlwRwFpexxajGHz+hvmCWUFoFT+aSau8Irbnxb9mXwPmaY7sv4Xbvducs+Wq7Nh1hszIc1Q0TGcJzQ== 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: 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