Re: [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration

From: Tejun Heo

Date: Tue Apr 21 2026 - 13:30:26 EST


Hello,

Thanks for the patch, but I don't think this makes the code better.
scx_root_enable_workfn() is a linear setup sequence; length comes
from the number of ordered steps, not from doing unrelated things.
Each extracted helper has exactly one caller, so the split is pure
code motion. The locking story and the error path both fragment
across three functions, and small things drift - the TID_TO_TASK
read moved from ops->flags to sch->ops.flags, which is equal today
but sch->ops.flags is mutated elsewhere (SCX_OPS_HAS_CPU_PREEMPT),
so the two sources aren't guaranteed to stay in sync.

Thanks.

--
tejun