From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-7.2] sched_ext: Refactor scx_root_enable_workfn() enablement task migration
Date: Wed, 22 Apr 2026 09:53:24 +0800 [thread overview]
Message-ID: <20260422094555.Gaec7@cchengyang.duckdns.org> (raw)
In-Reply-To: <6cccef586daa450e322d9659d4e64e13@kernel.org>
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
next prev parent reply other threads:[~2026-04-22 1:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2026-04-22 17:18 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260422094555.Gaec7@cchengyang.duckdns.org \
--to=yphbchou0911@gmail.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chia7712@gmail.com \
--cc=emil@etsalapatis.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox