From: Thomas Gleixner <tglx@linutronix.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Keith Busch <keith.busch@intel.com>,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs
Date: Sun, 21 May 2017 20:31:47 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1705212028280.3023@nanos> (raw)
In-Reply-To: <20170519085756.29742-3-hch@lst.de>
On Fri, 19 May 2017, Christoph Hellwig wrote:
> - /* Stabilize the cpumasks */
> - get_online_cpus();
How is that protected against physical CPU hotplug? Physical CPU hotplug
manipulates the present mask.
> - nodes = get_nodes_in_cpumask(cpu_online_mask, &nodemsk);
> + nodes = get_nodes_in_cpumask(cpu_present_mask, &nodemsk);
> +static int __init irq_build_cpumap(void)
> +{
> + int node, cpu;
> +
> + for (node = 0; node < nr_node_ids; node++) {
> + if (!zalloc_cpumask_var(&node_to_present_cpumask[node],
> + GFP_KERNEL))
> + panic("can't allocate early memory\n");
> + }
>
> - return min(cpus, vecs) + resv;
> + for_each_present_cpu(cpu) {
> + node = cpu_to_node(cpu);
> + cpumask_set_cpu(cpu, node_to_present_cpumask[node]);
> + }
This mask needs updating on physical hotplug as well.
Thanks,
tglx
next prev parent reply other threads:[~2017-05-21 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 8:57 spread MSI(-X) vectors to all possible CPUs V2 Christoph Hellwig
2017-05-19 8:57 ` [PATCH 1/7] genirq: allow assigning affinity to present but not online CPUs Christoph Hellwig
2017-05-19 8:57 ` [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs Christoph Hellwig
2017-05-21 18:31 ` Thomas Gleixner [this message]
2017-05-23 9:35 ` Christoph Hellwig
2017-05-19 8:57 ` [PATCH 3/7] genirq/affinity: factor out a irq_affinity_set helper Christoph Hellwig
2017-05-21 19:03 ` Thomas Gleixner
2017-05-23 9:37 ` Christoph Hellwig
2017-05-19 8:57 ` [PATCH 4/7] genirq/affinity: update CPU affinity for CPU hotplug events Christoph Hellwig
2017-05-19 8:57 ` [PATCH 5/7] blk-mq: include all present CPUs in the default queue mapping Christoph Hellwig
2017-05-19 8:57 ` [PATCH 6/7] blk-mq: create hctx for each present CPU Christoph Hellwig
2017-05-19 8:57 ` [PATCH 7/7] nvme: allocate queues for all possible CPUs Christoph Hellwig
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=alpine.DEB.2.20.1705212028280.3023@nanos \
--to=tglx@linutronix.de \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.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).