All of lore.kernel.org
 help / color / mirror / Atom feed
From: dingxiang@huawei.com (dingxiang)
Subject: some questions about create I/O queues
Date: Thu, 30 Apr 2015 09:26:13 +0800	[thread overview]
Message-ID: <554184B5.8070207@huawei.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1504291321260.15930@localhost.lm.intel.com>

On 2015/4/29 21:22, Keith Busch wrote:

> On Tue, 28 Apr 2015, dingxiang wrote:
>>   When I create I/O queues and not create from qid 1,for example, I create
>>   from qid 3,then I insmod nvme driver, there will be some error information as below
> 
> How did you manage to create IO queues starting from QID 3 when the
> driver wasn't loaded?
> 
> 

HI,Keith
   I have modified two places to create queues from QID 3 before the driver loaded,
details are as follows:
   kernel version:3.10

diff --git a/nvme-core.c b/nvme-core.c
index ce79a59..8325b58 100644
--- a/nvme-core.c
+++ b/nvme-core.c
@@ -226,7 +226,7 @@ static void *cancel_cmdid(struct nvme_queue *nvmeq, int cmdid,

 struct nvme_queue *get_nvmeq(struct nvme_dev *dev)
 {
-       return dev->queues[get_cpu() + 1];
+       return dev->queues[3];
 }

 void put_nvmeq(struct nvme_queue *nvmeq)
@@ -1703,7 +1703,7 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)

        q_depth = min_t(int, NVME_CAP_MQES(readq(&dev->bar->cap)) + 1,
                                                                NVME_Q_DEPTH);
-       for (i = 0; i < nr_io_queues; i++) {
+       for (i = 2; i < nr_io_queues; i++) {
                dev->queues[i + 1] = nvme_create_queue(dev, i + 1, q_depth, i);
                if (IS_ERR(dev->queues[i + 1]))
                        return PTR_ERR(dev->queues[i + 1]);

   Thanks !

      reply	other threads:[~2015-04-30  1:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 11:30 [PATCHv2] NVMe: write_long SCSI to NVMe translation implementation Sunad Bhandary S
2015-03-17 12:04 ` Sunad Bhandary
2015-03-17 12:59   ` Matthew Wilcox
2015-03-18 15:13     ` Sunad Bhandary
2015-03-18 15:24       ` Busch, Keith
2015-03-19 11:57         ` Sunad Bhandary
     [not found]     ` <5540471F.5030606@huawei.com>
2015-04-29 13:22       ` some questions about create I/O queues Keith Busch
2015-04-30  1:26         ` dingxiang [this message]

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=554184B5.8070207@huawei.com \
    --to=dingxiang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.