Re: [PATCH v25 8/9] sched: Move attach_one_task and attach_task helpers to sched.h

From: K Prateek Nayak

Date: Mon Mar 16 2026 - 22:30:02 EST


Hello John,

On 3/17/2026 5:04 AM, John Stultz wrote:
> On Sun, Mar 15, 2026 at 9:34 AM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
>> On 3/13/2026 8:00 AM, John Stultz wrote:
>>> +/*
>>> + * attach_one_task() -- attaches the task returned from detach_one_task() to
>>> + * its new rq.
>>> + */
>>> +static inline void attach_one_task(struct rq *rq, struct task_struct *p)
>>> +{
>>> + struct rq_flags rf;
>>> +
>>> + rq_lock(rq, &rf);
>>
>> nit. We can now use guard(rq_lock)(rq) and save on needing to declare a
>> "rf". Apart from that, feel free to include:
>
> I actually did this in a later patch in the full series, as it seemed
> more clear I wasn't modifying logic when moving the code:
> https://github.com/johnstultz-work/linux-dev/commit/8d8a12278d81ce81af6b0dfd051750f4ce2ec0e5
>
> But, given your feedback, I'll go ahead and fold that fix down to this
> change and add a note in the commit message.

Thanks a ton! That reminds me that I should go look at the full proxy
series once again. I've queued some usual benchmark runs for these bits
on top of tip - I've hopeful I've sorted the stuff with longer running
benchmarks this time around; will report back once they are done.

Again, thank you for incorporating the suggestions and reworking the
series. Much appreciated _/\_

--
Thanks and Regards,
Prateek