On Wed, Apr 30, 2025 at 10:38:10PM +0800, Yafang Shao wrote: > On Wed, Apr 30, 2025 at 9:19 PM Zi Yan <ziy@xxxxxxxxxx> wrote: > > For task-level control, why not using prctl(PR_SET_THP_DISABLE)? > > You’ll need to modify the user-space code—and again, this likely > wouldn’t be a concern if you were managing a large fleet of servers. These flags are propagated along the process tree, so you only need to tweak the management software that launches the container workload. Which is presumably the same entity that would tweak cgroup settings. > > For service-level control, there was a proposal of adding cgroup based > > THP control[1]. You might need a strong use case to convince people. > > > > [1] https://lore.kernel.org/linux-mm/20241030083311.965933-1-gutierrez.asier@xxxxxxxxxxxxxxxxxxx/ > > Thanks for the reference. I've reviewed the related discussion, and if > I understand correctly, the proposal was rejected by the maintainers. Cgroups are for nested trees dividing up resources. They're not a good fit for arbitrary, non-hierarchical policy settings.