Messages in this thread | | | Date | Mon, 1 Mar 2021 19:07:20 +0530 | From | Srikar Dronamraju <> | Subject | Re: [PATCH] sched/fair: Prefer idle CPU to cache affinity |
| |
* Rik van Riel <riel@surriel.com> [2021-02-27 14:56:07]:
> > In the current situation where waker and previous CPUs are busy, but > > only one of its LLC has an idle CPU, Scheduler may end up picking a > > LLC > > with no idle CPUs. To mitigate this, add a new step between 1 and 2 > > where Scheduler compares idle CPUs in waker and previous LLCs and > > picks > > the appropriate one. > > I like that idea a lot. That could also solve some of the
Thanks.
> issues sometimes observed on multi-node x86 systems, and > probably on the newer AMD chips with several LLCs on chip. >
Okay.
> > + if (sched_feat(WA_WAKER) && tnr_busy < tllc_size) > > + return this_cpu; > > I wonder if we need to use a slightly lower threshold on > very large LLCs, both to account for the fact that the > select_idle_cpu code may not find the single idle CPU > among a dozen busy ones, or because on a system with > hyperthreading we may often be better off picking another > LLC for HT contention issues?
> > Maybe we could use "tnr_busy * 4 < > tllc_size * 3" or > something like that? > > That way we will only try to find the last 5 idle > CPUs > in a 22 CPU LLC if the other LLC also has fewer than 6 > idle cores. > > That might increase our chances of finding an idle CPU > with SIS_PROP enabled, and might allow WA_WAKER to be > true by default.
Agree we need to be conservative esp if we want to make WA_WAKER on by default. I would still like to hear from other people if they think its ok to enable it by default. I wonder if enabling it by default can cause some load imbalances leading to more active load balance down the line. I haven't benchmarked with WA_WAKER enabled.
Thanks Rik for your inputs.
-- Thanks and Regards Srikar Dronamraju
| |