From: m@bjorling.me (Matias Bjorling)
Subject: [PATCH 5/5 v2] nvme: LightNVM support
Date: Thu, 16 Apr 2015 19:17:47 +0200 [thread overview]
Message-ID: <552FEEBB.2010106@bjorling.me> (raw)
In-Reply-To: <alpine.LNX.2.00.1504161433110.32385@localhost.lm.intel.com>
Den 16-04-2015 kl. 16:55 skrev Keith Busch:
> On Wed, 15 Apr 2015, Matias Bj?rling wrote:
>> @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> struct nvme_id_ctrl *ctrl;
>> void *mem;
>> dma_addr_t dma_addr;
>> - int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12;
>> + u64 cap = readq(&dev->bar->cap);
>> + int shift = NVME_CAP_MPSMIN(cap) + 12;
>> + int nvm_cmdset = NVME_CAP_NVM(cap);
>
> The controller capabilities' command sets supported used here is the
> right way to key off on support for this new command set, IMHO, but I do
> not see in this patch the command set being selected when the controller
> is enabled
I'll get that added. Wouldn't it just be that the command set always is
selected? A NVMe controller can expose both normal and lightnvm
namespaces. So we would always enable it, if CAP bit is set.
>
> Also if we're going this route, I think we need to define this reserved
> bit in the spec, but I'm not sure how to help with that.
Agree, we'll see how it can be proposed.
>
>> @@ -2332,6 +2704,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> ctrl = mem;
>> nn = le32_to_cpup(&ctrl->nn);
>> dev->oncs = le16_to_cpup(&ctrl->oncs);
>> + dev->oacs = le16_to_cpup(&ctrl->oacs);
>
> I don't find OACS used anywhere in the rest of the patch. I think this
> must be left over from v1.
Oops, yes, that's just a left over.
>
> Otherwise it looks pretty good to me, but I think it would be cleaner if
> the lightnvm stuff is not mixed in the same file with the standard nvme
> command set. We might end up splitting nvme-core in the future anyway
> for command sets and transports.
Will do. Thanks.
WARNING: multiple messages have this Message-ID (diff)
From: Matias Bjorling <m@bjorling.me>
To: Keith Busch <keith.busch@intel.com>
Cc: hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
javier@paletta.io
Subject: Re: [PATCH 5/5 v2] nvme: LightNVM support
Date: Thu, 16 Apr 2015 19:17:47 +0200 [thread overview]
Message-ID: <552FEEBB.2010106@bjorling.me> (raw)
In-Reply-To: <alpine.LNX.2.00.1504161433110.32385@localhost.lm.intel.com>
Den 16-04-2015 kl. 16:55 skrev Keith Busch:
> On Wed, 15 Apr 2015, Matias Bjørling wrote:
>> @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> struct nvme_id_ctrl *ctrl;
>> void *mem;
>> dma_addr_t dma_addr;
>> - int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12;
>> + u64 cap = readq(&dev->bar->cap);
>> + int shift = NVME_CAP_MPSMIN(cap) + 12;
>> + int nvm_cmdset = NVME_CAP_NVM(cap);
>
> The controller capabilities' command sets supported used here is the
> right way to key off on support for this new command set, IMHO, but I do
> not see in this patch the command set being selected when the controller
> is enabled
I'll get that added. Wouldn't it just be that the command set always is
selected? A NVMe controller can expose both normal and lightnvm
namespaces. So we would always enable it, if CAP bit is set.
>
> Also if we're going this route, I think we need to define this reserved
> bit in the spec, but I'm not sure how to help with that.
Agree, we'll see how it can be proposed.
>
>> @@ -2332,6 +2704,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> ctrl = mem;
>> nn = le32_to_cpup(&ctrl->nn);
>> dev->oncs = le16_to_cpup(&ctrl->oncs);
>> + dev->oacs = le16_to_cpup(&ctrl->oacs);
>
> I don't find OACS used anywhere in the rest of the patch. I think this
> must be left over from v1.
Oops, yes, that's just a left over.
>
> Otherwise it looks pretty good to me, but I think it would be cleaner if
> the lightnvm stuff is not mixed in the same file with the standard nvme
> command set. We might end up splitting nvme-core in the future anyway
> for command sets and transports.
Will do. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Matias Bjorling <m@bjorling.me>
To: Keith Busch <keith.busch@intel.com>
Cc: hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
javier@paletta.io
Subject: Re: [PATCH 5/5 v2] nvme: LightNVM support
Date: Thu, 16 Apr 2015 19:17:47 +0200 [thread overview]
Message-ID: <552FEEBB.2010106@bjorling.me> (raw)
In-Reply-To: <alpine.LNX.2.00.1504161433110.32385@localhost.lm.intel.com>
Den 16-04-2015 kl. 16:55 skrev Keith Busch:
> On Wed, 15 Apr 2015, Matias Bjørling wrote:
>> @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> struct nvme_id_ctrl *ctrl;
>> void *mem;
>> dma_addr_t dma_addr;
>> - int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12;
>> + u64 cap = readq(&dev->bar->cap);
>> + int shift = NVME_CAP_MPSMIN(cap) + 12;
>> + int nvm_cmdset = NVME_CAP_NVM(cap);
>
> The controller capabilities' command sets supported used here is the
> right way to key off on support for this new command set, IMHO, but I do
> not see in this patch the command set being selected when the controller
> is enabled
I'll get that added. Wouldn't it just be that the command set always is
selected? A NVMe controller can expose both normal and lightnvm
namespaces. So we would always enable it, if CAP bit is set.
>
> Also if we're going this route, I think we need to define this reserved
> bit in the spec, but I'm not sure how to help with that.
Agree, we'll see how it can be proposed.
>
>> @@ -2332,6 +2704,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
>> ctrl = mem;
>> nn = le32_to_cpup(&ctrl->nn);
>> dev->oncs = le16_to_cpup(&ctrl->oncs);
>> + dev->oacs = le16_to_cpup(&ctrl->oacs);
>
> I don't find OACS used anywhere in the rest of the patch. I think this
> must be left over from v1.
Oops, yes, that's just a left over.
>
> Otherwise it looks pretty good to me, but I think it would be cleaner if
> the lightnvm stuff is not mixed in the same file with the standard nvme
> command set. We might end up splitting nvme-core in the future anyway
> for command sets and transports.
Will do. Thanks.
next prev parent reply other threads:[~2015-04-16 17:17 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 12:34 [PATCH 0/5 v2] Support for Open-Channel SSDs Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-15 12:34 ` [PATCH 1/5 v2] blk-mq: Add prep/unprep support Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-17 6:34 ` Christoph Hellwig
2015-04-17 6:34 ` Christoph Hellwig
2015-04-17 8:15 ` Matias Bjørling
2015-04-17 8:15 ` Matias Bjørling
2015-04-17 17:46 ` Christoph Hellwig
2015-04-17 17:46 ` Christoph Hellwig
2015-04-18 6:45 ` Matias Bjorling
2015-04-18 6:45 ` Matias Bjorling
2015-04-18 20:16 ` Christoph Hellwig
2015-04-18 20:16 ` Christoph Hellwig
2015-04-19 18:12 ` Matias Bjorling
2015-04-19 18:12 ` Matias Bjorling
2015-04-15 12:34 ` [PATCH 2/5 v2] blk-mq: Support for Open-Channel SSDs Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-16 9:10 ` Paul Bolle
2015-04-16 9:10 ` Paul Bolle
2015-04-16 10:23 ` Matias Bjørling
2015-04-16 10:23 ` Matias Bjørling
2015-04-16 10:23 ` Matias Bjørling
2015-04-16 11:34 ` Paul Bolle
2015-04-16 11:34 ` Paul Bolle
2015-04-16 11:34 ` Paul Bolle
2015-04-16 13:29 ` Matias Bjørling
2015-04-16 13:29 ` Matias Bjørling
2015-04-16 13:29 ` Matias Bjørling
2015-04-15 12:34 ` [PATCH 3/5 v2] lightnvm: RRPC target Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-16 9:12 ` Paul Bolle
2015-04-16 9:12 ` Paul Bolle
2015-04-15 12:34 ` [PATCH 4/5 v2] null_blk: LightNVM support Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-15 12:34 ` [PATCH 5/5 v2] nvme: " Matias Bjørling
2015-04-15 12:34 ` Matias Bjørling
2015-04-16 14:55 ` Keith Busch
2015-04-16 14:55 ` Keith Busch
2015-04-16 15:14 ` Javier González
2015-04-16 15:14 ` Javier González
2015-04-16 15:52 ` Keith Busch
2015-04-16 15:52 ` Keith Busch
2015-04-16 16:01 ` James R. Bergsten
2015-04-16 16:01 ` James R. Bergsten
2015-04-16 16:01 ` James R. Bergsten
2015-04-16 16:12 ` Keith Busch
2015-04-16 16:12 ` Keith Busch
2015-04-16 17:17 ` Matias Bjorling [this message]
2015-04-16 17:17 ` Matias Bjorling
2015-04-16 17:17 ` Matias Bjorling
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=552FEEBB.2010106@bjorling.me \
--to=m@bjorling.me \
/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.