* [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs
2017-02-03 14:35 spread MSI(-X) vectors to all possible CPUs Christoph Hellwig
@ 2017-02-03 14:35 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2017-02-03 14:35 UTC (permalink / raw)
To: Thomas Gleixner, Jens Axboe
Cc: Keith Busch, linux-nvme, linux-block, linux-kernel
This will allow us to spread MSI/MSI-X affinity over all present CPUs and
thus better deal with systems where cpus are take on and offline all the
time.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
kernel/irq/manage.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 6b669593e7eb..7a1424330f9c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -354,22 +354,22 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask)
/*
* Preserve the managed affinity setting and an userspace affinity
- * setup, but make sure that one of the targets is online.
+ * setup, but make sure that one of the targets is present.
*/
if (irqd_affinity_is_managed(&desc->irq_data) ||
irqd_has_set(&desc->irq_data, IRQD_AFFINITY_SET)) {
if (cpumask_intersects(desc->irq_common_data.affinity,
- cpu_online_mask))
+ cpu_present_mask))
set = desc->irq_common_data.affinity;
else
irqd_clear(&desc->irq_data, IRQD_AFFINITY_SET);
}
- cpumask_and(mask, cpu_online_mask, set);
+ cpumask_and(mask, cpu_present_mask, set);
if (node != NUMA_NO_NODE) {
const struct cpumask *nodemask = cpumask_of_node(node);
- /* make sure at least one of the cpus in nodemask is online */
+ /* make sure at least one of the cpus in nodemask is present */
if (cpumask_intersects(mask, nodemask))
cpumask_and(mask, mask, nodemask);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs
[not found] ` <20170204015809.GA16203@zipoli.ccur.kvm>
@ 2017-02-05 16:40 ` Christoph Hellwig
2017-02-06 17:03 ` Keith Busch
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-02-05 16:40 UTC (permalink / raw)
To: Joe Korty
Cc: Christoph Hellwig, Keith Busch, linux-nvme, linux-block,
linux-kernel
Hi Joe,
On Fri, Feb 03, 2017 at 08:58:09PM -0500, Joe Korty wrote:
> IIRC, some years ago I ran across a customer system where
> the #cpus_present was twice as big as #cpus_possible.
>
> Hyperthreading was turned off in the BIOS so it was not
> entirely out of line for the extra cpus to be declared
> present, even though none of them would ever be available
> for use.
This sounds like a system we should quirk around instead of optimizing
for it. Unless I totally misunderstand the idea behind cpu_possible
and cpu_present.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs
2017-02-05 16:40 ` [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs Christoph Hellwig
@ 2017-02-06 17:03 ` Keith Busch
2017-02-06 17:03 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2017-02-06 17:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Joe Korty, linux-nvme, linux-block, linux-kernel
On Sun, Feb 05, 2017 at 05:40:23PM +0100, Christoph Hellwig wrote:
> Hi Joe,
>
> On Fri, Feb 03, 2017 at 08:58:09PM -0500, Joe Korty wrote:
> > IIRC, some years ago I ran across a customer system where
> > the #cpus_present was twice as big as #cpus_possible.
> >
> > Hyperthreading was turned off in the BIOS so it was not
> > entirely out of line for the extra cpus to be declared
> > present, even though none of them would ever be available
> > for use.
>
> This sounds like a system we should quirk around instead of optimizing
> for it. Unless I totally misunderstand the idea behind cpu_possible
> and cpu_present.
Can we use the online CPUs and create a new hot-cpu notifier to the nvme
driver to free/reallocate as needed? We were doing that before blk-mq. Now
blk-mq can change the number hardware contexts on a live queue, so we
can reintroduce that behavior to nvme and only allocate what we need.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs
2017-02-06 17:03 ` Keith Busch
@ 2017-02-06 17:03 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2017-02-06 17:03 UTC (permalink / raw)
To: Keith Busch
Cc: Christoph Hellwig, Joe Korty, linux-nvme, linux-block,
linux-kernel
On Mon, Feb 06, 2017 at 12:03:05PM -0500, Keith Busch wrote:
> Can we use the online CPUs and create a new hot-cpu notifier to the nvme
> driver to free/reallocate as needed? We were doing that before blk-mq. Now
> blk-mq can change the number hardware contexts on a live queue, so we
> can reintroduce that behavior to nvme and only allocate what we need.
That could be a next step, but given how badly I keep messing up core
IRQ bits we'll probably want to wait for two rewrites of those bits
from Thomas before moving on :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-06 17:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <t6NbP-2IT-5@gated-at.bofh.it>
[not found] ` <t6NbP-2IT-13@gated-at.bofh.it>
[not found] ` <20170204015809.GA16203@zipoli.ccur.kvm>
2017-02-05 16:40 ` [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs Christoph Hellwig
2017-02-06 17:03 ` Keith Busch
2017-02-06 17:03 ` Christoph Hellwig
2017-02-03 14:35 spread MSI(-X) vectors to all possible CPUs Christoph Hellwig
2017-02-03 14:35 ` [PATCH 1/6] genirq: allow assigning affinity to present but not online CPUs Christoph Hellwig
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).