Re: [PATCH 0/1] RFC: sched/fair: skip select_idle_sibling() in presence of sync wakeups
From: Andrea Arcangeli
Date: Wed Jan 09 2019 - 13:24:22 EST
On Wed, Jan 09, 2019 at 10:07:51AM +0000, Mel Gorman wrote:
> I agree with Mike here. Many previous attempts to strictly obey the strict
> hint has led to regressions elsewhere -- specifically a task waking 2+
> wakees that temporarily stack on one CPU when nearby CPUs sharing LLC
sync-waking 2 wakees in a row before going to sleep should cause the
runqueue to have nr_running != 1 after the first wakee is waken up on
the local CPU. Your example explains the following nr_running == 1
check in the patch:
(sync && target == this_cpu && cpu_rq(this_cpu)->nr_running == 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The implementation is just an RFC because it may have other drawbacks,
but I thought the second wakee of this specific example supposedly
should still do the idle core/ht balancing normally like before the
change.
Thanks,
Andrea