lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170201093437.GB1189@lst.de>
Date:   Wed, 1 Feb 2017 10:34:37 +0100
From:   Christoph Hellwig <hch@....de>
To:     Shaohua Li <shli@...com>
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        hch@....de, axboe@...com
Subject: Re: [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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ