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

Tejun Heo
2026-04-21T17:30:19Z

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