Re: [PATCH 2/2] nvme: allocate nvme_queue in correct node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +		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.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux