From: "Li Zhe" <lizhe.67@bytedance.com>
To: <akpm@linux-foundation.org>
Cc: <david@kernel.org>, <fvdl@google.com>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<lizhe.67@bytedance.com>, <muchun.song@linux.dev>,
<osalvador@suse.de>, <mjguzik@gmail.com>, <mhocko@suse.com>,
<joao.m.martins@oracle.com>, <ankur.a.arora@oracle.com>,
<raghavendra.kt@amd.com>
Subject: Re: [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism
Date: Mon, 12 Jan 2026 19:25:09 +0800 [thread overview]
Message-ID: <20260112112509.94521-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <20260107081921.0e189904060f49a555142e28@linux-foundation.org>
On Wed, 7 Jan 2026 08:19:21 -0800, akpm@linux-foundation.org wrote:
> > In user space, we can use system calls such as epoll and write to zero
> > huge folios as they become available, and sleep when none are ready. The
> > following pseudocode illustrates this approach. The pseudocode spawns
> > eight threads (each running thread_fun()) that wait for huge pages on
> > node 0 to become eligible for zeroing; whenever such pages are available,
> > the threads clear them in parallel.
>
> This seems to be quite a lot of messing around in userspace. Perhaps
> unavoidable given the tradeoffs which are involved, and reasonable in
> the sort of environments in which this will be used.
Apologies for the delayed response. I share the same view.
> I guess there are many alternatives - let's see what others think.
Let's cc the developers who took part in the earlier discussion and
see whether any better ideas emerge.
> > fs/hugetlbfs/inode.c | 3 +-
> > include/linux/hugetlb.h | 26 +++++
> > mm/hugetlb.c | 131 ++++++++++++++++++++++---
> > mm/hugetlb_internal.h | 6 ++
> > mm/hugetlb_sysfs.c | 206 ++++++++++++++++++++++++++++++++++++----
> > 5 files changed, 337 insertions(+), 35 deletions(-)
>
> Let's find places in Documentation/ (and Documentation/ABI) to document
> the userspace interface?
I believe this userspace interface should be documented in
'Documentation/admin-guide/mm/hugetlbpage.rst', and I will include
this update in V3.
However, I noticed that no document under 'Documentation/ABI' explicitly
describe the interfaces under directory
'/sys/devices/system/node/nodeX/hugepages/hugepages-<size>/'. Instead, it
points directly to 'Documentation/admin-guide/mm/hugetlbpage.rst' (see
'Documentation/ABI/stable/sysfs-devices-node').
Given this, is it sufficient to only modify
'Documentation/admin-guide/mm/hugetlbpage.rst'?
Thanks,
Zhe
next prev parent reply other threads:[~2026-01-12 11:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 11:31 Li Zhe
2026-01-07 11:31 ` [PATCH v2 1/8] mm/hugetlb: add pre-zeroed framework Li Zhe
2026-01-07 11:31 ` [PATCH v2 2/8] mm/hugetlb: convert to prep_account_new_hugetlb_folio() Li Zhe
2026-01-07 11:31 ` [PATCH v2 3/8] mm/hugetlb: move the huge folio to the end of the list during enqueue Li Zhe
2026-01-07 11:31 ` [PATCH v2 4/8] mm/hugetlb: introduce per-node sysfs interface "zeroable_hugepages" Li Zhe
2026-01-07 11:31 ` [PATCH v2 5/8] mm/hugetlb: simplify function hugetlb_sysfs_add_hstate() Li Zhe
2026-01-07 11:31 ` [PATCH v2 6/8] mm/hugetlb: relocate the per-hstate struct kobject pointer Li Zhe
2026-01-07 11:31 ` [PATCH v2 7/8] mm/hugetlb: add epoll support for interface "zeroable_hugepages" Li Zhe
2026-01-07 11:31 ` [PATCH v2 8/8] mm/hugetlb: limit event generation frequency of function do_zero_free_notify() Li Zhe
2026-01-07 16:19 ` [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism Andrew Morton
2026-01-12 11:25 ` Li Zhe [this message]
2026-01-09 6:05 ` Muchun Song
2026-01-12 11:27 ` Li Zhe
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=20260112112509.94521-1-lizhe.67@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=ankur.a.arora@oracle.com \
--cc=david@kernel.org \
--cc=fvdl@google.com \
--cc=joao.m.martins@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mjguzik@gmail.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=raghavendra.kt@amd.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