Re: [RESEND x2][PATCH v12 5/7] sched: Consolidate pick_*_task to task_is_pushable helper

From: John Stultz
Date: Fri Sep 13 2024 - 20:37:31 EST


On Thu, Sep 12, 2024 at 10:29 AM Christian Loehle
<christian.loehle@xxxxxxx> wrote:
> On 9/10/24 23:12, John Stultz wrote:
> > +static inline
> > +bool task_is_pushable(struct rq *rq, struct task_struct *p, int cpu)
> > +{
> > + if (!task_on_cpu(rq, p) &&
> > + cpumask_test_cpu(cpu, &p->cpus_mask))
> > + return true;
> > +
> > + return false;
> > +}
>
> The slightly awkward
> if (condition)
> return true;
> return false;
>
> is more convenient for you for the tri-state later, I assume.
> Fine by me FWIW.
> Reviewed-by: Christian Loehle <christian.loehle@xxxxxxx>

Thanks so much for the review! Very much appreciate it!
-john