public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
Cc: tglx@linutronix.de, hch@lst.de, kbusch@kernel.org,
	linux-kernel@vger.kernel.org, maz@kernel.org,
	ming.lei@redhat.com
Subject: Re: [PATCH] irq: consider cpus on nodes are unbalanced
Date: Wed, 15 Dec 2021 12:33:28 +0800	[thread overview]
Message-ID: <YblwGHAom8qkq4PW@T590> (raw)
In-Reply-To: <20211215015711.28188-1-yamamoto.rei@jp.fujitsu.com>

On Wed, Dec 15, 2021 at 10:57:11AM +0900, Rei Yamamoto wrote:
> On Wed, Nov 24 2021 at 20:33, Thomas Gleixner wrote:
> > Cc'ing a few people who worked on this code.
> >
> >> 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.

There is always difference between the two number of nodes, the 1st is
node number covering present cpus, and the 2nd one is the node number
covering other possible cpus not spread.

>> This patch fixes 2 problems caused by the difference of the

Is there any user visible problem?

> >> number of nodes:
> >>
> >>  - If some unused vectors remain after building masks for present cpus,

We just select a new vector for starting the spread if un-allocated
vectors remains, but the number for allocation is still numvecs. We hope both
present cpus and non-present cpus can be balanced on each vector, so that each
vector may get present cpu allocated.

> >>    remained vectors are assigned for building masks for possible cpus.
> >>    Therefore "numvecs <= nodes" condition must be
> >>    "vecs_to_assign <= nodes_to_assign". Fix this problem by making this
> >>    condition appropriate.
> >>
> >>  - 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.

'numvecs' is always the total number of vectors for assigning CPUs, if
the number is <= nodes, we just assign interested cpus in the whole
node into each vector until all interested cpus are allocated out.

 
> Do you have any comments?

Not see issues in current way, or can you explain a bit the real
user visible problem in details?

Thanks,
Ming


  reply	other threads:[~2021-12-15  4:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  8:27 [PATCH] irq: consider cpus on nodes are unbalanced Rei Yamamoto
2021-11-24 19:33 ` Thomas Gleixner
2021-12-15  1:57   ` Rei Yamamoto
2021-12-15  4:33     ` Ming Lei [this message]
2021-12-17  2:48       ` Rei Yamamoto
2021-12-17  6:57         ` Ming Lei
2021-12-17  7:12           ` 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=YblwGHAom8qkq4PW@T590 \
    --to=ming.lei@redhat.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox