Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571366
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] nvme: allocate nvme_queue in correct node |
| Date | 2017-02-01 10:40 +0100 |
| Message-ID | <t5Zyp-4a5-7@gated-at.bofh.it> (permalink) |
| References | <t5UIp-1aG-5@gated-at.bofh.it> <t5UIp-1aG-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> + mask = pci_irq_get_affinity(to_pci_dev(dev->dev), i);
> + if (mask) {
> + node = cpu_to_node(cpumask_first(mask));
> + node = local_memory_node(node);
> + }
Can you move this to a PCI-layer helper, e.g. something like:
int pci_irq_get_node(struct pci_dev *dev, unsigned vec)
{
const struct cpumask *mask = pci_irq_get_affinity(dev), i);
if (mask)
return local_memory_node(cpu_to_node(cpumask_first(mask)));
return dev_to_node(&dev->dev);
}
Otherwise this looks fine.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] nvme: allocate nvme_queue in correct node Shaohua Li <shli@fb.com> - 2017-02-01 05:30 +0100 Re: [PATCH 2/2] nvme: allocate nvme_queue in correct node Christoph Hellwig <hch@lst.de> - 2017-02-01 10:40 +0100
csiph-web