From: David Hildenbrand <david@redhat.com>
To: Xueshi Hu <xueshi.hu@smartx.com>,
mike.kravetz@oracle.com, muchun.song@linux.dev, corbet@lwn.net,
akpm@linux-foundation.org, n-horiguchi@ah.jp.nec.com,
osalvador@suse.de
Cc: linux-mm@kvack.org
Subject: Re: [PATCH v2 1/4] mm/hugetlb: fix the inconsistency of /proc/sys/vm/nr_huge_pages
Date: Mon, 7 Aug 2023 17:15:54 +0200 [thread overview]
Message-ID: <5c9ebf69-cd59-0fb3-bb85-1ab219426530@redhat.com> (raw)
In-Reply-To: <20230806074853.317203-2-xueshi.hu@smartx.com>
On 06.08.23 09:48, Xueshi Hu wrote:
> There are currently three 'nr_hugepages' used to export the number of huge
> pages:
> 1. /proc/sys/vm/nr_hugepages
> 2. /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
> 3. /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
>
> For consistency, all three 'nr_hugepages' should return the total number
> of huge pages. When written, the number of persistent huge pages will be
> adjusted to the specified value.
>
> But, /proc/sys/vm/nr_hugepages returns the number of persistent huge
> pages.
>
But that's documented behavior, no?
Documentation/admin-guide/mm/hugetlbpage.rst
``/proc/sys/vm/nr_hugepages`` indicates the current number of "persistent" huge
pages in the kernel's huge page pool. "Persistent" huge pages will be
returned to the huge page pool when freed by a task. A user with root
privileges can dynamically allocate more or free some persistent huge pages
by increasing or decreasing the value of ``nr_hugepages``.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-08-07 15:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-06 7:48 [PATCH v2 0/4] mm/hugetlb: fix /sys and /proc fs dealing with persistent hugepages Xueshi Hu
2023-08-06 7:48 ` [PATCH v2 1/4] mm/hugetlb: fix the inconsistency of /proc/sys/vm/nr_huge_pages Xueshi Hu
2023-08-07 15:15 ` David Hildenbrand [this message]
2023-08-08 2:28 ` Xueshi Hu
2023-08-08 7:58 ` David Hildenbrand
2023-08-08 9:13 ` Xueshi Hu
2023-08-10 0:17 ` Mike Kravetz
2023-08-10 7:34 ` David Hildenbrand
2023-08-10 22:15 ` Mike Kravetz
2023-08-25 4:02 ` Xueshi Hu
2023-08-25 21:15 ` Mike Kravetz
2023-08-26 2:51 ` Xueshi Hu
2023-08-06 7:48 ` [PATCH v2 2/4] mm/hugeltb: clean up hstate::max_huge_pages Xueshi Hu
2023-08-07 15:17 ` David Hildenbrand
2023-08-06 7:48 ` [PATCH v2 3/4] mm/hugeltb: fix nodes huge page allocation when there are surplus pages Xueshi Hu
2023-08-06 7:48 ` [PATCH v2 4/4] docs: hugetlbpage.rst: make the meaning of persistent hugetlb pages clear Xueshi Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c9ebf69-cd59-0fb3-bb85-1ab219426530@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=osalvador@suse.de \
--cc=xueshi.hu@smartx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox