From: "Li Zhe" <lizhe.67@bytedance.com>
To: <mjguzik@gmail.com>
Cc: <akpm@linux-foundation.org>, <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>
Subject: Re: [PATCH 0/8] Introduce a huge-page pre-zeroing mechanism
Date: Mon, 29 Dec 2025 20:31:53 +0800 [thread overview]
Message-ID: <20251229123153.7578-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <fmuw35nyxafum22ni7ozhybjaarf77baqq774czok4k6y6eqqb@4oabqflx7ryz>
On Sat, 27 Dec 2025 08:21:16 +0100, mjguzik@gmail.com wrote:
> In the name of "provide tools, not policy" making userspace call the
> shots is the right approach, which I advocated for in the original
> thread.
Thank you for your endorsement!
> I do have concerns about the specific interface as I think it is a
> little too limited.
>
> Suppose vastly different deployments with different needs. For example
> one may want to keep at least n pages ready to use, RAM permitting.
>
> At the same time it perhaps would like to balance CPU usage vs other
> tasks, so for example it would control parallelism based on observed
> churn rate.
>
> So a toolset I would consider viable would need to provide an extensible
> interface to future-proof it.
>
> As for an immediate need not met with the current patchset, there is no
> configurable threshold for free zeroed page count to generate a wake up.
>
> I suspect a bunch of ioctls would be needed here.
>
> I don't know if sysfs is viable at all for this. Worst case a device (or
> a set of per-node devices) can be created with the same goal.
In my view, the present kernel framework does not allow an ioctl
interface to be placed under the per-node huge-page directories.
The functionality you describe appears to align closely with that
offered by the cgroup.event_control interface in the memory
controller.
We could therefore introduce a new event_control file for huge-page
events, following the same pattern. Given that all huge-page
attributes already live in sysfs, such an addition would keep the
interface consistent and avoid the extra indirection of a new
/dev/hugepagectl file.
Thanks,
Zhe
next prev parent reply other threads:[~2025-12-29 12:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-25 8:20 李喆
2025-12-25 8:20 ` [PATCH 1/8] mm/hugetlb: add pre-zeroed framework 李喆
2025-12-26 9:24 ` Raghavendra K T
2025-12-26 9:48 ` Li Zhe
2025-12-25 8:20 ` [PATCH 2/8] mm/hugetlb: convert to prep_account_new_hugetlb_folio() 李喆
2025-12-25 8:20 ` [PATCH 3/8] mm/hugetlb: move the huge folio to the end of the list during enqueue 李喆
2025-12-25 8:20 ` [PATCH 4/8] mm/hugetlb: introduce per-node sysfs interface "zeroable_hugepages" 李喆
2025-12-26 18:51 ` Frank van der Linden
2025-12-29 12:25 ` Li Zhe
2025-12-29 18:57 ` Frank van der Linden
2025-12-30 2:41 ` Li Zhe
2025-12-25 8:20 ` [PATCH 5/8] mm/hugetlb: simplify function hugetlb_sysfs_add_hstate() 李喆
2025-12-25 8:20 ` [PATCH 6/8] mm/hugetlb: relocate the per-hstate struct kobject pointer 李喆
2025-12-25 8:20 ` [PATCH 7/8] mm/hugetlb: add epoll support for interface "zeroable_hugepages" 李喆
2025-12-25 8:20 ` [PATCH 8/8] mm/hugetlb: limit event generation frequency of function do_zero_free_notify() 李喆
2025-12-26 18:32 ` [PATCH 0/8] Introduce a huge-page pre-zeroing mechanism Frank van der Linden
2025-12-26 21:42 ` Frank van der Linden
2025-12-29 12:28 ` Li Zhe
2025-12-27 7:21 ` Mateusz Guzik
2025-12-29 12:31 ` Li Zhe [this message]
2025-12-28 21:44 ` Andrew Morton
2025-12-29 12:34 ` 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=20251229123153.7578-1-lizhe.67@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=fvdl@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mjguzik@gmail.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
/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