From: Ming Lei <ming.lei@redhat.com>
To: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] irq: consider cpus on nodes are unbalanced
Date: Thu, 10 Feb 2022 12:10:18 +0800 [thread overview]
Message-ID: <YgSQKvv7rL6MFPRr@T590> (raw)
In-Reply-To: <20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com>
On Thu, Feb 10, 2022 at 12:10:53PM +0900, Rei Yamamoto wrote:
> If cpus on a node are offline at boot time, there are
> difference in the number of nodes between when building affinity
> masks for present cpus and when building affinity masks for possible
> cpus. This patch fixes a problem caused by the difference of the
> number of nodes:
>
> - The routine of "numvecs <= nodes" condition can overwrite bits of
> masks for present cpus in building masks for possible cpus. Fix this
> problem by making CPU bits, which is not target, not changing.
>
> Signed-off-by: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
> Reviewed-by: Ming Lei <ming.lei@redhat.com>
> ---
> kernel/irq/affinity.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index f7ff8919dc9b..d2d01565d2ec 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
> */
> if (numvecs <= nodes) {
> for_each_node_mask(n, nodemsk) {
> + cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
> cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
> - node_to_cpumask[n]);
> + nmsk);
> if (++curvec == last_affv)
> curvec = firstvec;
> }
> --
> 2.27.0
>
--
Ming
next parent reply other threads:[~2022-02-10 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com>
2022-02-10 4:10 ` Ming Lei [this message]
2022-03-30 4:42 ` [PATCH v3] irq: consider cpus on nodes are unbalanced Rei Yamamoto
2022-03-30 23:09 ` Thomas Gleixner
2022-03-31 0:24 ` Rei Yamamoto
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=YgSQKvv7rL6MFPRr@T590 \
--to=ming.lei@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=yamamoto.rei@jp.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.