Re: [RESEND][PATCH v9 4/7] sched: Add do_push_task helper

From: John Stultz
Date: Tue Apr 09 2024 - 18:36:41 EST


On Tue, Apr 9, 2024 at 9:30 AM Valentin Schneider <vschneid@xxxxxxxxxx> wrote:
> Naming nit below notwithstanding:
>
> Reviewed-by: Valentin Schneider <vschneid@xxxxxxxxxx>

Hey! Thanks so much for taking a look and providing this feedback! I
really appreciate it!

> > +static inline
> > +void do_push_task(struct rq *rq, struct rq *dst_rq, struct task_struct *task)
>
> The naming IMO unfortunately clashes with the hotplug push_task /
> balance_push() stuff.
>
> AFAICT this is move_queued_task() but in a double rq lock
> context. How about move_queued_task_locked()?

Sounds good to me! Changed in my pre-v10 tree.


> Interestingly, all the patched call sites end up with a resched_curr(), but
> move_queued_task() has wakeup_preempt() instead.

Yeah. I'll look a bit more to see if I can find a way to fold the
resched in as well, and try to make sure I understand the subtle
difference in move_queued_task() - I don't want the name similarity to
confuse if the behavior is different.

Again, thanks so much for the feedback and review!
-john