[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d31a65af-d1d5-5fd1-276c-d2318cdba078@arm.com>
Date: Fri, 30 Apr 2021 12:42:56 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>,
Vincent Guittot <vincent.guittot@...aro.org>
Cc: "tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"will@...nel.org" <will@...nel.org>,
"rjw@...ysocki.net" <rjw@...ysocki.net>,
"bp@...en8.de" <bp@...en8.de>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"lenb@...nel.org" <lenb@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"bsegall@...gle.com" <bsegall@...gle.com>,
"mgorman@...e.de" <mgorman@...e.de>,
"msys.mizuma@...il.com" <msys.mizuma@...il.com>,
"valentin.schneider@....com" <valentin.schneider@....com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
"juri.lelli@...hat.com" <juri.lelli@...hat.com>,
"mark.rutland@....com" <mark.rutland@....com>,
"sudeep.holla@....com" <sudeep.holla@....com>,
"aubrey.li@...ux.intel.com" <aubrey.li@...ux.intel.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>, "xuwei (O)" <xuwei5@...wei.com>,
"Zengtao (B)" <prime.zeng@...ilicon.com>,
"guodong.xu@...aro.org" <guodong.xu@...aro.org>,
yangyicong <yangyicong@...wei.com>,
"Liguozhu (Kenneth)" <liguozhu@...ilicon.com>,
"linuxarm@...neuler.org" <linuxarm@...neuler.org>,
"hpa@...or.com" <hpa@...or.com>
Subject: Re: [RFC PATCH v6 3/4] scheduler: scan idle cpu in cluster for tasks
within one LLC
On 29/04/2021 00:41, Song Bao Hua (Barry Song) wrote:
>
>
>> -----Original Message-----
>> From: Dietmar Eggemann [mailto:dietmar.eggemann@....com]
[...]
>>>>> From: Dietmar Eggemann [mailto:dietmar.eggemann@....com]
>>
>> [...]
>>
>>>>> On 20/04/2021 02:18, Barry Song wrote:
[...]
> Though we will never go to slow path, wake_wide() will affect want_affine,
> so eventually affect the "new_cpu"?
yes.
>
> for_each_domain(cpu, tmp) {
> /*
> * If both 'cpu' and 'prev_cpu' are part of this domain,
> * cpu is a valid SD_WAKE_AFFINE target.
> */
> if (want_affine && (tmp->flags & SD_WAKE_AFFINE) &&
> cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {
> if (cpu != prev_cpu)
> new_cpu = wake_affine(tmp, p, cpu, prev_cpu, sync);
>
> sd = NULL; /* Prefer wake_affine over balance flags */
> break;
> }
>
> if (tmp->flags & sd_flag)
> sd = tmp;
> else if (!want_affine)
> break;
> }
>
> If wake_affine is false, the above won't execute, new_cpu(target) will
> always be "prev_cpu"? so when task size > cluster size in wake_wide(),
> this means we won't pull the wakee to the cluster of waker? It seems
> sensible.
What is `task size` here?
The criterion is `!(slave < factor || master < slave * factor)` or
`slave >= factor && master >= slave * factor` to wake wide.
I see that since you effectively change the sched domain size from LLC
to CLUSTER (e.g. 24->6) for wakeups with cpu and prev_cpu sharing LLC
(hence the `numactl -N 0` in your workload), wake_wide() has to take
CLUSTER size into consideration.
I was wondering if you saw wake_wide() returning 1 with your use cases:
numactl -N 0 /usr/lib/lmbench/bin/stream -P [6,12] -M 1024M -N 5
Powered by blists - more mailing lists