linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Valentin Schneider <valentin.schneider@arm.com>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Cc: lizefan@huawei.com, tj@kernel.org, hannes@cmpxchg.org,
	mingo@kernel.org, peterz@infradead.org,
	vincent.guittot@linaro.org, morten.rasmussen@arm.com,
	qperret@google.com, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] sched/topology: Don't try to build empty sched domains
Date: Wed, 23 Oct 2019 13:46:17 +0200	[thread overview]
Message-ID: <9134acf7-69bb-403b-2e9c-0eb7fb7efabd@arm.com> (raw)
In-Reply-To: <20191015154250.12951-2-valentin.schneider@arm.com>

On 15/10/2019 17:42, Valentin Schneider wrote:

[...]

> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index c52bc91f882b..a859e5539440 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -817,6 +817,11 @@ static int generate_sched_domains(cpumask_var_t **domains,
>  		struct cpuset *a = csa[i];
>  		int apn = a->pn;
>  
> +		if (cpumask_empty(a->effective_cpus)) {
> +			ndoms--;
> +			continue;
> +		}
> +
>  		for (j = 0; j < csn; j++) {
>  			struct cpuset *b = csa[j];
>  			int bpn = b->pn;
> @@ -859,6 +864,9 @@ static int generate_sched_domains(cpumask_var_t **domains,
>  			continue;
>  		}
>  
> +		if (cpumask_empty(a->effective_cpus))
> +			continue;
> +

Can you not just prevent that a cpuset pointer (cp) is added to the
cpuset array (csa[]) in case cpumask_empty(cp->effective_cpus)?

@@ -798,9 +800,14 @@ static int generate_sched_domains(cpumask_var_t
**domains, cpumask_subset(cp->cpus_allowed, top_cpuset.effective_cpus))
                        continue;

-   if (is_sched_load_balance(cp))
+   if (is_sched_load_balance(cp) && !cpumask_empty(cp->effective_cpus))
            csa[csn++] = cp;

>  		dp = doms[nslot];
>  
>  		if (nslot == ndoms) {

[...]

  parent reply	other threads:[~2019-10-23 11:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 15:42 [PATCH v3 0/2] sched/topology: Asymmetric topologies fixes Valentin Schneider
2019-10-15 15:42 ` [PATCH v3 1/2] sched/topology: Don't try to build empty sched domains Valentin Schneider
2019-10-22 11:43   ` Dietmar Eggemann
2019-10-22 12:46     ` Valentin Schneider
2019-10-23 11:46   ` Dietmar Eggemann [this message]
2019-10-23 14:12     ` Valentin Schneider
2019-10-15 15:42 ` [PATCH v3 2/2] sched/topology: Allow sched_asym_cpucapacity to be disabled Valentin Schneider
2019-10-23  8:45   ` Dietmar Eggemann

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=9134acf7-69bb-403b-2e9c-0eb7fb7efabd@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=qperret@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).