Re: [PATCH v1] cgroup: drop preemption_disabled checking
From: Tejun Heo
Date: Wed Nov 19 2025 - 10:59:38 EST
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