linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Barry Song" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Barry Song <song.bao.hua@hisilicon.com>,
	Ingo Molnar <mingo@kernel.org>,
	Valentin Schneider <Valentin.Schneider@arm.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/topology: Remove redundant cpumask_and() in init_overlap_sched_group()
Date: Thu, 25 Mar 2021 11:08:37 -0000	[thread overview]
Message-ID: <161667051732.398.15690730249125096642.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210325023140.23456-1-song.bao.hua@hisilicon.com>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     0a2b65c03e9b47493e1442bf9c84badc60d9bffb
Gitweb:        https://git.kernel.org/tip/0a2b65c03e9b47493e1442bf9c84badc60d9bffb
Author:        Barry Song <song.bao.hua@hisilicon.com>
AuthorDate:    Thu, 25 Mar 2021 15:31:40 +13:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 25 Mar 2021 11:41:23 +01:00

sched/topology: Remove redundant cpumask_and() in init_overlap_sched_group()

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 the cpumask_and() call is redundant - remove it.

[ mingo: Adjusted the changelog a bit. ]

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Valentin Schneider <Valentin.Schneider@arm.com>
Link: https://lore.kernel.org/r/20210325023140.23456-1-song.bao.hua@hisilicon.com
---
 kernel/sched/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index f2066d6..d1aec24 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -934,7 +934,7 @@ static void init_overlap_sched_group(struct sched_domain *sd,
 	int cpu;
 
 	build_balance_mask(sd, sg, mask);
-	cpu = cpumask_first_and(sched_group_span(sg), mask);
+	cpu = cpumask_first(mask);
 
 	sg->sgc = *per_cpu_ptr(sdd->sgc, cpu);
 	if (atomic_inc_return(&sg->sgc->ref) == 1)

      reply	other threads:[~2021-03-25 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  2:31 [PATCH v2] sched/topology: remove redundant cpumask_and in init_overlap_sched_group Barry Song
2021-03-25 11:08 ` tip-bot2 for Barry Song [this message]

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=161667051732.398.15690730249125096642.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=Valentin.Schneider@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=song.bao.hua@hisilicon.com \
    --cc=x86@kernel.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).