[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <jhj8s6y7rnk.mognet@arm.com>
Date: Sun, 07 Mar 2021 18:19:43 +0000
From: Valentin Schneider <valentin.schneider@....com>
To: "Song Bao Hua \(Barry Song\)" <song.bao.hua@...ilicon.com>,
"vincent.guittot\@linaro.org" <vincent.guittot@...aro.org>,
"mingo\@redhat.com" <mingo@...hat.com>,
"peterz\@infradead.org" <peterz@...radead.org>,
"juri.lelli\@redhat.com" <juri.lelli@...hat.com>,
"dietmar.eggemann\@arm.com" <dietmar.eggemann@....com>,
"rostedt\@goodmis.org" <rostedt@...dmis.org>,
"bsegall\@google.com" <bsegall@...gle.com>,
"mgorman\@suse.de" <mgorman@...e.de>
Cc: "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxarm\@openeuler.org" <linuxarm@...neuler.org>
Subject: RE: [PATCH] sched/topology: remove redundant cpumask_and in init_overlap_sched_group
On 05/03/21 20:25, Song Bao Hua (Barry Song) wrote:
>> -----Original Message-----
>> From: Valentin Schneider [mailto:valentin.schneider@....com]
>> Sent: Saturday, March 6, 2021 12:49 AM
>> To: Song Bao Hua (Barry Song) <song.bao.hua@...ilicon.com>;
>> vincent.guittot@...aro.org; mingo@...hat.com; peterz@...radead.org;
>> juri.lelli@...hat.com; dietmar.eggemann@....com; rostedt@...dmis.org;
>> bsegall@...gle.com; mgorman@...e.de
>> Cc: linux-kernel@...r.kernel.org; linuxarm@...neuler.org; Song Bao Hua (Barry
>> Song) <song.bao.hua@...ilicon.com>
>> Subject: Re: [PATCH] sched/topology: remove redundant cpumask_and in
>> init_overlap_sched_group
>>
>> On 05/03/21 11:29, Barry Song wrote:
>> > mask is built in build_balance_mask() by for_each_cpu(i, sg_span), so
>> > it must be a subset of sched_group_span(sg).
>>
>> So we should indeed have
>>
>> cpumask_subset(sched_group_span(sg), mask)
>>
>> but that doesn't imply
>>
>> cpumask_first(sched_group_span(sg)) == cpumask_first(mask)
>>
>> does it? I'm thinking if in your topology of N CPUs, CPUs 0 and N-1 are the
>> furthest away, you will most likely hit
>
> It is true:
> cpumask_first(sched_group_span(sg)) != cpumask_first(mask)
>
> but
>
> cpumask_first_and(sched_group_span(sg), mask) = cpumask_first(mask)
>
> since mask is always subset of sched_group_span(sg).
>
You're right, I read it the wrong way around, sorry about that.
Reviewed-by: Valentin Schneider <Valentin.Schneider@....com>
Powered by blists - more mailing lists