Re: [PATCH v8 -tip 06/26] sched: Add core wide task selection and scheduling.
From: Peter Zijlstra
Date: Mon Oct 26 2020 - 04:29:42 EST
On Fri, Oct 23, 2020 at 05:31:18PM -0400, Joel Fernandes wrote:
> BTW, as further optimization in the future, isn't it better for the
> schedule() loop on 1 HT to select for all HT *even if* need_sync == false to
> begin with? i.e. no cookied tasks are runnable.
>
> That way the pick loop in schedule() running on other HTs can directly pick
> what was pre-selected for it via:
> if (rq->core->core_pick_seq == rq->core->core_task_seq &&
> rq->core->core_pick_seq != rq->core_sched_seq &&
> rq->core_pick)
> .. which I think is more efficient. Its just a thought and may not be worth doing.
I'm not sure that works. Imagine a sibling doing a wakeup (or sleep)
just after you done your core wide pick. Then it will have to repick and
you end up with having to do 2*nr_smt picks instead of 2 picks.