Re: [PATCH] sched_ext: sync disable_irq_work in bpf_scx_unreg()
From: Tejun Heo
Date: Wed Apr 22 2026 - 13:24:22 EST
Hello,
On Wed, Apr 22, 2026 at 06:51:13PM +0800, Cheng-Yang Chou wrote:
> Also, scx_root_enable_workfn() has the same pattern in its error path:
>
> scx_error(sch, "scx_root_enable() failed (%d)", ret);
> kthread_flush_work(&sch->disable_work);
Yeah, can you please add a helper - e.g. flush_disable_work() - to package
sync and flush and use that in both places?
> > + /*
> > + * sch->disable_work might still not queued, causing kthread_flush_work()
> > + * as a noop. Syncing the irq_work first is required to guarantee the
>
> Perhaps s/noop/no-op/? Though it's just a matter of taste. ^_^
noop is used widely in the kernel. In general, I don't think we need this
level of language policing.
Thanks.
--
tejun