From: Ming Lei <ming.lei@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Ming Lei <ming.lei@redhat.com>,
Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
linux-nvme@lists.infradead.org,
Jon Derrick <jonathan.derrick@intel.com>,
Jens Axboe <axboe@kernel.dk>
Subject: [PATCH V2 3/3] genirq/affinity: Enhance warning check
Date: Mon, 12 Aug 2019 17:57:09 +0800 [thread overview]
Message-ID: <20190812095709.25623-4-ming.lei@redhat.com> (raw)
In-Reply-To: <20190812095709.25623-1-ming.lei@redhat.com>
The two-stage spread is done on same irq vectors, and we just need that
either one stage covers all vector, not two stage work together to cover
all vectors.
So enhance the warning check to make sure all vectors are spread.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>
Cc: linux-nvme@lists.infradead.org,
Cc: Jon Derrick <jonathan.derrick@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Fixes: 6da4b3ab9a6 ("genirq/affinity: Add support for allocating interrupt sets")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
kernel/irq/affinity.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index 927dcbe80482..178dc7eb7b35 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -318,8 +318,7 @@ static int irq_build_affinity_masks(unsigned int startvec, unsigned int numvecs,
npresmsk, nmsk, masks);
put_online_cpus();
- if (nr_present < numvecs)
- WARN_ON(nr_present + nr_others < numvecs);
+ WARN_ON(max(nr_present, nr_others) < numvecs);
free_node_to_cpumask(node_to_cpumask);
--
2.20.1
prev parent reply other threads:[~2019-08-12 9:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 9:57 [PATCH V2 0/3] genriq/affinity: Make vectors allocation fair Ming Lei
2019-08-12 9:57 ` [PATCH V2 1/3] genirq/affinity: Improve __irq_build_affinity_masks() Ming Lei
2019-08-12 9:57 ` [PATCH V2 2/3] genirq/affinity: Spread vectors on node according to nr_cpu ratio Ming Lei
2019-08-12 15:27 ` Keith Busch
2019-08-13 7:41 ` Ming Lei
2019-08-13 9:26 ` Ming Lei
2019-08-13 13:25 ` Ming Lei
2019-08-12 9:57 ` Ming Lei [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=20190812095709.25623-4-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jonathan.derrick@intel.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=tglx@linutronix.de \
/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