mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, sudeep.holla@arm.com,
	prime.zeng@hisilicon.com, dietmar.eggemann@arm.com,
	morten.rasmussen@arm.com, mingo@kernel.org
Subject: Re: [PATCH] sched/topology: Assert non-NUMA topology masks don't (partially) overlap
Date: Thu, 16 Jan 2020 15:30:55 +0000	[thread overview]
Message-ID: <09b2f817-fcd9-8697-38d7-12d141a47a48@arm.com> (raw)
In-Reply-To: <20200116151942.GW2871@hirez.programming.kicks-ass.net>



On 16/01/2020 15:19, Peter Zijlstra wrote:
> On Thu, Jan 16, 2020 at 11:44:28AM +0100, Peter Zijlstra wrote:
>> On Wed, Jan 15, 2020 at 04:09:15PM +0000, Valentin Schneider wrote:
>>> @@ -1975,6 +2011,9 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att
>>>  				has_asym = true;
>>>  			}
>>>  
>>> +			if (WARN_ON(!topology_span_sane(tl, cpu_map, i)))
>>> +				goto error;
>>> +
>>>  			sd = build_sched_domain(tl, cpu_map, attr, sd, dflags, i);
>>>  
>>>  			if (tl == sched_domain_topology)
>>
>> This is O(nr_cpus), but then, that function already is, so I don't see a
>> problem with this.
> 
> Clearly I meant to write O(nr_cpus^2), there's a bunch of nested
> for_each_cpu() in there.
> 

Hm so the sanity check is O(topo_levels * nr_cpus²), and I think that
roughly matches the complexity of building the sched_groups (I say
roughly because you go over less CPUs as you go up the topo levels).

As you said the important bit is that we don't make build_sched_domains()
noticeably worse, which I think is the case...

>> I'll take it, thanks!

  reply	other threads:[~2020-01-16 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 16:09 Valentin Schneider
2020-01-16 10:44 ` Peter Zijlstra
2020-01-16 10:48   ` Valentin Schneider
2020-01-16 15:19   ` Peter Zijlstra
2020-01-16 15:30     ` Valentin Schneider [this message]
2020-01-17 10:08 ` [tip: sched/core] " tip-bot2 for Valentin Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09b2f817-fcd9-8697-38d7-12d141a47a48@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®