lkml.org 
[lkml]   [2017]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] nvme: allocate nvme_queue in correct node
> +		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.

\
 
 \ /
  Last update: 2017-02-01 10:35    [W:0.037 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site