From: "kanchan" <joshi.k@samsung.com>
To: "'Jan Kara'" <jack@suse.cz>
Cc: <linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>,
<linux-nvme@lists.infradead.org>, <linux-fsdevel@vger.kernel.org>,
<linux-ext4@vger.kernel.org>, <prakash.v@samsung.com>
Subject: RE: [PATCH v4 5/7] nvme: register stream info with block layer
Date: Mon, 22 Apr 2019 19:13:20 +0530 [thread overview]
Message-ID: <009d01d4f911$5ec3af70$1c4b0e50$@samsung.com> (raw)
In-Reply-To: <20190418135223.GK28541@quack2.suse.cz>
> This changes the current behavior, doesn't it? Previously devices with
less than 5 hints got streams completely disabled, now they will have
streams enabled but ids beyond supported max will be mapped to 0. I'm not
against this but I guess it should be spelled out explicitely in the
changelog.
Yes, that is a change in current behavior. Will add that in next version,
thanks.
-----Original Message-----
From: Jan Kara [mailto:jack@suse.cz]
Sent: Thursday, April 18, 2019 7:22 PM
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: linux-kernel@vger.kernel.org; linux-block@vger.kernel.org;
linux-nvme@lists.infradead.org; linux-fsdevel@vger.kernel.org;
linux-ext4@vger.kernel.org; prakash.v@samsung.com
Subject: Re: [PATCH v4 5/7] nvme: register stream info with block layer
On Wed 17-04-19 23:20:04, Kanchan Joshi wrote:
> Make nvme driver register number of streams with block layer. Block
> layer will use that for write-hint to stream-id conversion.
> Registration is done for each namespace. Since NVMe spec allow all
> available streams (within subsystem) to be used by all namespaces, no
> attempt has been made to add reservation at namespace level.
>
> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
> ---
> drivers/nvme/host/core.c | 23 ++++++-----------------
> 1 file changed, 6 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index
> 2c43e12..81b86fa 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -464,10 +464,6 @@ static int nvme_toggle_streams(struct nvme_ctrl
*ctrl, bool enable)
> return nvme_submit_sync_cmd(ctrl->admin_q, &c, NULL, 0); }
>
> -static int nvme_disable_streams(struct nvme_ctrl *ctrl) -{
> - return nvme_toggle_streams(ctrl, false);
> -}
>
> static int nvme_enable_streams(struct nvme_ctrl *ctrl) { @@ -510,14
> +506,7 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl)
> return ret;
>
> ctrl->nssa = le16_to_cpu(s.nssa);
> - if (ctrl->nssa < BLK_MAX_WRITE_HINTS - 1) {
> - dev_info(ctrl->device, "too few streams (%u) available\n",
> - ctrl->nssa);
> - nvme_disable_streams(ctrl);
> - return 0;
> - }
> -
> - ctrl->nr_streams = min_t(unsigned, ctrl->nssa, BLK_MAX_WRITE_HINTS -
1);
> + ctrl->nr_streams = ctrl->nssa;
> dev_info(ctrl->device, "Using %u streams\n", ctrl->nr_streams);
> return 0;
> }
This changes the current behavior, doesn't it? Previously devices with less
than 5 hints got streams completely disabled, now they will have streams
enabled but ids beyond supported max will be mapped to 0. I'm not against
this but I guess it should be spelled out explicitely in the changelog.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2019-04-22 13:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190417175347epcas2p41e4240ab83b46c9f07d237fc9494903a@epcas2p4.samsung.com>
2019-04-17 17:49 ` [PATCH v4 0/7] Extend write-hint/stream infrastructure Kanchan Joshi
2019-04-17 17:50 ` [PATCH v4 1/7] fs: introduce write-hint start point for in-kernel hints Kanchan Joshi
2019-04-17 17:50 ` [PATCH v4 2/7] block: increase stream count for in-kernel use Kanchan Joshi
2019-04-17 17:50 ` [PATCH v4 3/7] block: introduce API to register stream information with block-layer Kanchan Joshi
2019-04-17 17:50 ` [PATCH v4 4/7] block: introduce write-hint to stream-id conversion Kanchan Joshi
2019-04-17 17:57 ` Jens Axboe
2019-04-22 13:36 ` kanchan
2019-04-18 14:06 ` Jan Kara
2019-04-18 18:58 ` Andreas Dilger
2019-04-22 13:33 ` kanchan
2019-04-17 17:50 ` [PATCH v4 5/7] nvme: register stream info with block layer Kanchan Joshi
2019-04-18 13:52 ` Jan Kara
2019-04-22 13:43 ` kanchan [this message]
2019-04-17 17:50 ` [PATCH v4 6/7] fs: introduce APIs to enable passing write-hint with buffer-head Kanchan Joshi
2019-04-17 17:50 ` [PATCH v4 7/7] fs/ext4,jbd2: add support for sending write-hint with journal Kanchan Joshi
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='009d01d4f911$5ec3af70$1c4b0e50$@samsung.com' \
--to=joshi.k@samsung.com \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=prakash.v@samsung.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