From: Christoph Hellwig <hch@lst.de>
To: Shaohua Li <shli@fb.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
hch@lst.de, axboe@fb.com
Subject: Re: [PATCH 2/2] nvme: allocate nvme_queue in correct node
Date: Wed, 1 Feb 2017 10:34:37 +0100 [thread overview]
Message-ID: <20170201093437.GB1189@lst.de> (raw)
In-Reply-To: <7119c172f8916bd21aeffc006b04cd73281afb25.1485922654.git.shli@fb.com>
> + 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.
next prev parent reply other threads:[~2017-02-01 9:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 4:25 [PATCH 1/2] blk-mq: allocate blk_mq_tags and requests in correct node Shaohua Li
2017-02-01 4:25 ` [PATCH 2/2] nvme: allocate nvme_queue " Shaohua Li
2017-02-01 9:34 ` Christoph Hellwig [this message]
2017-02-01 9:32 ` [PATCH 1/2] blk-mq: allocate blk_mq_tags and requests " 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=20170201093437.GB1189@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@fb.com \
/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