* Re: [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration [not found] <20260421074154.584737-1-yphbchou0911@gmail.com> @ 2026-04-21 17:30 ` Tejun Heo 2026-04-22 1:53 ` Cheng-Yang Chou 0 siblings, 1 reply; 3+ messages in thread From: Tejun Heo @ 2026-04-21 17:30 UTC (permalink / raw) To: Cheng-Yang Chou Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min, Ching-Chun Huang, Chia-Ping Tsai, Emil Tsalapatis, linux-kernel 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration 2026-04-21 17:30 ` [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration Tejun Heo @ 2026-04-22 1:53 ` Cheng-Yang Chou 2026-04-22 17:18 ` Tejun Heo 0 siblings, 1 reply; 3+ messages in thread From: Cheng-Yang Chou @ 2026-04-22 1:53 UTC (permalink / raw) To: Tejun Heo Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min, Ching-Chun Huang, Chia-Ping Tsai, Emil Tsalapatis, linux-kernel Hi Tejun, On Tue, Apr 21, 2026 at 07:30:18AM -1000, Tejun Heo wrote: > 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. I see your point about maintaining the linear sequence for better auditability of the locking and error paths. You're also right about the TID_TO_TASK drift - checking the immutable ops->flags is indeed the correct approach. Regarding the ordering of the task enablement sequence: do you think it would be useful to be included in the kdoc? Thanks for your time. -- Cheers, Cheng-Yang ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration 2026-04-22 1:53 ` Cheng-Yang Chou @ 2026-04-22 17:18 ` Tejun Heo 0 siblings, 0 replies; 3+ messages in thread From: Tejun Heo @ 2026-04-22 17:18 UTC (permalink / raw) To: Cheng-Yang Chou Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min, Ching-Chun Huang, Chia-Ping Tsai, Emil Tsalapatis, linux-kernel On Wed, Apr 22, 2026 at 09:53:24AM +0800, Cheng-Yang Chou wrote: > Regarding the ordering of the task enablement sequence: do you think > it would be useful to be included in the kdoc? Who'd be the audience tho? This isn't a level of detail that'd be interesting to people who want to use SCX. For kernel devs, I don't think a doc which just restates the code sequence is all that useful when you can just throw an AI agent at it and get the same and more in no time. -- tejun ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-22 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260421074154.584737-1-yphbchou0911@gmail.com>
2026-04-21 17:30 ` [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration Tejun Heo
2026-04-22 1:53 ` Cheng-Yang Chou
2026-04-22 17:18 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox