[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aR3paXRgyxdeO4sC@slm.duckdns.org>
Date: Wed, 19 Nov 2025 05:59:37 -1000
From: Tejun Heo <tj@...nel.org>
To: Jiayuan Chen <jiayuan.chen@...ux.dev>
Cc: cgroups@...r.kernel.org, hannes@...xchg.org, mkoutny@...e.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] cgroup: drop preemption_disabled checking
Hello,
On Wed, Nov 19, 2025 at 07:14:01PM +0800, Jiayuan Chen wrote:
> BPF programs do not disable preemption, they only disable migration.
> Therefore, when running the cgroup_hierarchical_stats selftest, a
> warning [1] is generated.
>
> The css_rstat_updated() function is lockless and reentrant, so checking
> for disabled preemption is unnecessary (please correct me if I'm wrong).
While it won't crash the kernel to schedule while running the function,
there are timing considerations here. If the thread which wins the lnode
competition gets scheduled out, there can be significant unexpected delays
for others that lost against it. Maybe just update the caller to disable
preemption?
Thanks.
--
tejun
Powered by blists - more mailing lists