NVMe multi-core process

Angelo Brito asb at cin.ufpe.br
Mon Sep 1 13:52:21 PDT 2014


Hi Harry,

In which version of the driver have you seen this code?
I am working with the kernels 3.10 and 3.15 and never seen more than
the Admin Queue and SQ1.
All my machines have multiple cores and one of them has multiple CPU.

Regards,
Angelo Silva Brito.
Digital Systems Engineer
http://about.me/angelobrito
_________________________________________________


On Mon, Sep 1, 2014 at 2:22 PM, harryxiyou <harryxiyou at gmail.com> wrote:
> On Mon, Sep 1, 2014 at 1:10 PM, harryxiyou <harryxiyou at gmail.com> wrote:
>> Dear Keith,
>>
>> I saw following words in the NVMe specification but I cannot see the
>> related codes
>> in the linux NVMe driver.
>>
>> "Typically the number of command queues created is based on the system
>> configuration and anticipated workload. For example, on a four core
>> processor based system, there may be a queue pair per core to avoid
>> locking and ensure data structures are created in the appropriate
>> processor core’s cache."
>>
>>
>> I don't know how to configure NVMe to run it on multiple cores?
>
>
> Maybe, I have found the related codes as follows.
>
> 1524 static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
> 1525 {
> 1526     struct pci_dev *pdev = dev->pci_dev;
> 1527     int result, cpu, i, vecs, nr_io_queues, db_bar_size, q_depth;
> 1528
> 1529     nr_io_queues = num_online_cpus();
> 1530     result = set_queue_count(dev, nr_io_queues);
> 1531     if (result < 0)
> 1532         return result;
> 1533     if (result < nr_io_queues)
> 1534         nr_io_queues = result;
> ...
> 1575     for (i = 0; i < nr_io_queues; i++) {
> 1576         dev->queues[i + 1] = nvme_create_queue(dev, i + 1, q_depth, i);
> 1577         if (IS_ERR(dev->queues[i + 1])) {
> 1578             result = PTR_ERR(dev->queues[i + 1]);
> 1579             goto free_queues;
> 1580         }
> 1581         dev->queue_count++;
> 1582     }
> ...
> }
>
>
>
> Anyway, thanks very much.
>
>
>
> Thanks, Harry.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme



More information about the Linux-nvme mailing list