[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aC4KMCK9JIbLCFcl@slm.duckdns.org>
Date: Wed, 21 May 2025 07:15:28 -1000
From: Tejun Heo <tj@...nel.org>
To: Zhongkun He <hezhongkun.hzk@...edance.com>
Cc: hannes@...xchg.org, longman@...hat.com, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, muchun.song@...ux.dev
Subject: Re: [PATCH] cpuset: introduce non-blocking cpuset.mems setting option
On Wed, May 21, 2025 at 11:45:27AM +0800, Zhongkun He wrote:
> Setting the cpuset.mems in cgroup v2 can trigger memory
> migrate in cpuset. This behavior is fine for newly created
> cgroups but it can cause issues for the existing cgroups.
> In our scenario, modifying the cpuset.mems setting during
> peak times frequently leads to noticeable service latency
> or stuttering.
>
> It is important to have a consistent set of behavior for
> both cpus and memory. But it does cause issues at times,
> so we would like to have a flexible option.
>
> This idea is from the non-blocking limit setting option in
> memory control.
>
> https://lore.kernel.org/all/20250506232833.3109790-1-shakeel.butt@linux.dev/
>
> Signed-off-by: Zhongkun He <hezhongkun.hzk@...edance.com>
> ---
> Documentation/admin-guide/cgroup-v2.rst | 7 +++++++
> kernel/cgroup/cpuset-internal.h | 6 ++++++
> kernel/cgroup/cpuset.c | 7 +++++++
> 3 files changed, 20 insertions(+)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 1a16ce68a4d7..d9e8e2a770af 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -2408,6 +2408,13 @@ Cpuset Interface Files
> a need to change "cpuset.mems" with active tasks, it shouldn't
> be done frequently.
>
> + If cpuset.mems is opened with O_NONBLOCK then the migration is
> + bypassed. This is useful for admin processes that need to adjust
> + the cpuset.mems dynamically without blocking. However, there is
> + a risk that previously allocated pages are not within the new
> + cpuset.mems range, which may be altered by move_pages syscall or
> + numa_balance.
As said in the other thread, nack on this approach.
Thanks.
--
tejun
Powered by blists - more mailing lists