mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bing Huang <huangbing775@126.com>
To: dietmar.eggemann@arm.com
Cc: rostedt@goodmis.org, brauner@kernel.org, bristot@redhat.com,
	bsegall@google.com, juri.lelli@redhat.com,
	linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com,
	peterz@infradead.org, vincent.guittot@linaro.org
Subject: [PATCH] sched/topology: Covered all cpus of same node in asymmetric node setups
Date: Sun, 30 Jul 2023 06:22:03 +0800	[thread overview]
Message-ID: <20230729222203.5601-1-huangbing775@126.com> (raw)

in asymmetric node setups, if one cpu'sd spans is empty in some depth,
others in same node do

Signed-off-by: Bing Huang <huangbing@kylinos.cn>
---
 kernel/sched/topology.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 7cfcfe5d27b9..8c5372ad7694 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1045,8 +1045,10 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
 		 * Domains should always include the CPU they're built on, so
 		 * check that.
 		 */
-		if (!cpumask_test_cpu(i, sched_domain_span(sibling)))
+		if (!cpumask_test_cpu(i, sched_domain_span(sibling))) {
+			cpumask_or(covered, covered, cpumask_of_node(cpu_to_node(i)));
 			continue;
+		}
 
 		/*
 		 * Usually we build sched_group by sibling's child sched_domain
-- 
2.25.1


             reply	other threads:[~2023-07-29 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 22:22 Bing Huang [this message]
2023-07-31 13:36 ` Peter Zijlstra

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=20230729222203.5601-1-huangbing775@126.com \
    --to=huangbing775@126.com \
    --cc=brauner@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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

all inboxes | Powered by JetHome®