All of lore.kernel.org
 help / color / mirror / Atom feed
* Write with Stream ID Support
@ 2015-04-21  1:47 ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe, kwan.huen, Dimitri John Ledkov
  Cc: linux-nvme, linux-kernel, linux-api


The attached patch set enables basic write with stream ID support. 
First patch reads the stream id embedded in the bio and passes to the 
device along with the write command.
Second patch adds two new nvme commands to be used with ioctl 
such that application can do open/close stream and host
initiated garbage collection.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Write with Stream ID Support
@ 2015-04-21  1:47 ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe,
	kwan.huen-Sze3O3UU22JBDgjK7y7TUQ, Dimitri John Ledkov
  Cc: linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA


The attached patch set enables basic write with stream ID support. 
First patch reads the stream id embedded in the bio and passes to the 
device along with the write command.
Second patch adds two new nvme commands to be used with ioctl 
such that application can do open/close stream and host
initiated garbage collection.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Write with Stream ID Support
@ 2015-04-21  1:47 ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)



The attached patch set enables basic write with stream ID support. 
First patch reads the stream id embedded in the bio and passes to the 
device along with the write command.
Second patch adds two new nvme commands to be used with ioctl 
such that application can do open/close stream and host
initiated garbage collection.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] added stream id write support
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe, kwan.huen, Dimitri John Ledkov
  Cc: linux-nvme, linux-kernel, linux-api

---
 drivers/block/nvme-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 85b8036..332341a 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
 	if (req->cmd_flags & REQ_RAHEAD)
 		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
 
+	if (rq_data_dir(req))
+		dsmgmt |= bio_get_streamid(req->bio) << 8;
+
 	cmnd = &nvmeq->sq_cmds[nvmeq->sq_tail];
 	memset(cmnd, 0, sizeof(*cmnd));
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/2] added stream id write support
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe,
	kwan.huen-Sze3O3UU22JBDgjK7y7TUQ, Dimitri John Ledkov
  Cc: linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

---
 drivers/block/nvme-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 85b8036..332341a 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
 	if (req->cmd_flags & REQ_RAHEAD)
 		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
 
+	if (rq_data_dir(req))
+		dsmgmt |= bio_get_streamid(req->bio) << 8;
+
 	cmnd = &nvmeq->sq_cmds[nvmeq->sq_tail];
 	memset(cmnd, 0, sizeof(*cmnd));
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/2] added stream id write support
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)


---
 drivers/block/nvme-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 85b8036..332341a 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
 	if (req->cmd_flags & REQ_RAHEAD)
 		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
 
+	if (rq_data_dir(req))
+		dsmgmt |= bio_get_streamid(req->bio) << 8;
+
 	cmnd = &nvmeq->sq_cmds[nvmeq->sq_tail];
 	memset(cmnd, 0, sizeof(*cmnd));
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] added two nvme commands for open/close streams and garbage collection
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe, kwan.huen, Dimitri John Ledkov
  Cc: linux-nvme, linux-kernel, linux-api

---
 include/uapi/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81..5025610 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -229,6 +229,8 @@ enum nvme_opcode {
 	nvme_cmd_resv_report	= 0x0e,
 	nvme_cmd_resv_acquire	= 0x11,
 	nvme_cmd_resv_release	= 0x15,
+	nvme_cmd_stream_ctrl	= 0x18,
+	nvme_cmd_gc_ctrl	= 0x1c,
 };
 
 struct nvme_common_command {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] added two nvme commands for open/close streams and garbage collection
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)
  To: Matthew Wilcox, Keith Busch, Jens Axboe,
	kwan.huen-Sze3O3UU22JBDgjK7y7TUQ, Dimitri John Ledkov
  Cc: linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

---
 include/uapi/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81..5025610 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -229,6 +229,8 @@ enum nvme_opcode {
 	nvme_cmd_resv_report	= 0x0e,
 	nvme_cmd_resv_acquire	= 0x11,
 	nvme_cmd_resv_release	= 0x15,
+	nvme_cmd_stream_ctrl	= 0x18,
+	nvme_cmd_gc_ctrl	= 0x1c,
 };
 
 struct nvme_common_command {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] added two nvme commands for open/close streams and garbage collection
@ 2015-04-21  1:47   ` kwan.huen
  0 siblings, 0 replies; 17+ messages in thread
From: kwan.huen @ 2015-04-21  1:47 UTC (permalink / raw)


---
 include/uapi/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81..5025610 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -229,6 +229,8 @@ enum nvme_opcode {
 	nvme_cmd_resv_report	= 0x0e,
 	nvme_cmd_resv_acquire	= 0x11,
 	nvme_cmd_resv_release	= 0x15,
+	nvme_cmd_stream_ctrl	= 0x18,
+	nvme_cmd_gc_ctrl	= 0x1c,
 };
 
 struct nvme_common_command {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] added two nvme commands for open/close streams and garbage collection
  2015-04-21  1:47   ` kwan.huen
  (?)
  (?)
@ 2015-04-21 13:21   ` Wilcox, Matthew R
  2015-04-21 17:48     ` Kwan (Hingkwan) Huen-SSI
  -1 siblings, 1 reply; 17+ messages in thread
From: Wilcox, Matthew R @ 2015-04-21 13:21 UTC (permalink / raw)


Woah, woah, woah!  Those command IDs have *NOT* been assigned by the NVMe working group!  NACK this patch!

-----Original Message-----
From: kwan.huen [mailto:kwan.huen@samsung.com] 
Sent: Monday, April 20, 2015 6:48 PM
To: Wilcox, Matthew R; Busch, Keith; Jens Axboe; kwan.huen at samsung.com; Dimitri John Ledkov
Cc: linux-nvme at lists.infradead.org; linux-kernel at vger.kernel.org; linux-api at vger.kernel.org
Subject: [PATCH 2/2] added two nvme commands for open/close streams and garbage collection

---
 include/uapi/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81..5025610 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -229,6 +229,8 @@ enum nvme_opcode {
 	nvme_cmd_resv_report	= 0x0e,
 	nvme_cmd_resv_acquire	= 0x11,
 	nvme_cmd_resv_release	= 0x15,
+	nvme_cmd_stream_ctrl	= 0x18,
+	nvme_cmd_gc_ctrl	= 0x1c,
 };
 
 struct nvme_common_command {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/2] added stream id write support
@ 2015-04-21 13:44     ` Jeff Moyer
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff Moyer @ 2015-04-21 13:44 UTC (permalink / raw)
  To: kwan.huen
  Cc: Matthew Wilcox, Keith Busch, Jens Axboe, Dimitri John Ledkov,
	linux-nvme, linux-kernel, linux-api

"kwan.huen" <kwan.huen@samsung.com> writes:

> ---
>  drivers/block/nvme-core.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> index 85b8036..332341a 100644
> --- a/drivers/block/nvme-core.c
> +++ b/drivers/block/nvme-core.c
> @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
>  	if (req->cmd_flags & REQ_RAHEAD)
>  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
>  
> +	if (rq_data_dir(req))
> +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> +

There's no public specification for this, yet.  How many bits are set
aside for the stream id?  Do you need to do bounds checking/input
validation?  What happens on adapters with older firmware when these
bits are set?

Cheers,
Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/2] added stream id write support
@ 2015-04-21 13:44     ` Jeff Moyer
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff Moyer @ 2015-04-21 13:44 UTC (permalink / raw)
  To: kwan.huen
  Cc: Matthew Wilcox, Keith Busch, Jens Axboe, Dimitri John Ledkov,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

"kwan.huen" <kwan.huen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> writes:

> ---
>  drivers/block/nvme-core.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> index 85b8036..332341a 100644
> --- a/drivers/block/nvme-core.c
> +++ b/drivers/block/nvme-core.c
> @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
>  	if (req->cmd_flags & REQ_RAHEAD)
>  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
>  
> +	if (rq_data_dir(req))
> +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> +

There's no public specification for this, yet.  How many bits are set
aside for the stream id?  Do you need to do bounds checking/input
validation?  What happens on adapters with older firmware when these
bits are set?

Cheers,
Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] added stream id write support
@ 2015-04-21 13:44     ` Jeff Moyer
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff Moyer @ 2015-04-21 13:44 UTC (permalink / raw)


"kwan.huen" <kwan.huen at samsung.com> writes:

> ---
>  drivers/block/nvme-core.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> index 85b8036..332341a 100644
> --- a/drivers/block/nvme-core.c
> +++ b/drivers/block/nvme-core.c
> @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue *nvmeq, struct nvme_iod *iod,
>  	if (req->cmd_flags & REQ_RAHEAD)
>  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
>  
> +	if (rq_data_dir(req))
> +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> +

There's no public specification for this, yet.  How many bits are set
aside for the stream id?  Do you need to do bounds checking/input
validation?  What happens on adapters with older firmware when these
bits are set?

Cheers,
Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/2] added two nvme commands for open/close streams and garbage collection
  2015-04-21 13:21   ` Wilcox, Matthew R
@ 2015-04-21 17:48     ` Kwan (Hingkwan) Huen-SSI
  0 siblings, 0 replies; 17+ messages in thread
From: Kwan (Hingkwan) Huen-SSI @ 2015-04-21 17:48 UTC (permalink / raw)


Thanks Matthew for the review!
Agree that this is still a bit early. We are in the process of getting the spec approved and will push these patches again after it goes on-line.
Thanks,
kwan 
________________________________________
From: Wilcox, Matthew R [matthew.r.wilcox@intel.com]
Sent: Tuesday, April 21, 2015 6:21 AM
To: kwan.huen; Busch, Keith; Jens Axboe; Dimitri John Ledkov
Cc: linux-nvme at lists.infradead.org; linux-kernel at vger.kernel.org; linux-api at vger.kernel.org
Subject: RE: [PATCH 2/2] added two nvme commands for open/close streams and garbage collection

Woah, woah, woah!  Those command IDs have *NOT* been assigned by the NVMe working group!  NACK this patch!

-----Original Message-----
From: kwan.huen [mailto:kwan.huen@samsung.com]
Sent: Monday, April 20, 2015 6:48 PM
To: Wilcox, Matthew R; Busch, Keith; Jens Axboe; kwan.huen at samsung.com; Dimitri John Ledkov
Cc: linux-nvme at lists.infradead.org; linux-kernel at vger.kernel.org; linux-api at vger.kernel.org
Subject: [PATCH 2/2] added two nvme commands for open/close streams and garbage collection

---
 include/uapi/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index aef9a81..5025610 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -229,6 +229,8 @@ enum nvme_opcode {
        nvme_cmd_resv_report    = 0x0e,
        nvme_cmd_resv_acquire   = 0x11,
        nvme_cmd_resv_release   = 0x15,
+       nvme_cmd_stream_ctrl    = 0x18,
+       nvme_cmd_gc_ctrl        = 0x1c,
 };

 struct nvme_common_command {
--
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* RE: [PATCH 1/2] added stream id write support
@ 2015-04-21 19:03       ` Hingkwan Huen
  0 siblings, 0 replies; 17+ messages in thread
From: Hingkwan Huen @ 2015-04-21 19:03 UTC (permalink / raw)
  To: 'Jeff Moyer'
  Cc: 'Matthew Wilcox', 'Keith Busch',
	'Jens Axboe', 'Dimitri John Ledkov',
	linux-nvme, linux-kernel, linux-api



> -----Original Message-----
> From: Jeff Moyer [mailto:jmoyer@redhat.com]
> Sent: Tuesday, April 21, 2015 6:45 AM
> To: kwan.huen
> Cc: Matthew Wilcox; Keith Busch; Jens Axboe; Dimitri John Ledkov; linux-
> nvme@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
> api@vger.kernel.org
> Subject: Re: [PATCH 1/2] added stream id write support
> 
> "kwan.huen" <kwan.huen@samsung.com> writes:
> 
> > ---
> >  drivers/block/nvme-core.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> > index 85b8036..332341a 100644
> > --- a/drivers/block/nvme-core.c
> > +++ b/drivers/block/nvme-core.c
> > @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue
> *nvmeq, struct nvme_iod *iod,
> >  	if (req->cmd_flags & REQ_RAHEAD)
> >  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
> >
> > +	if (rq_data_dir(req))
> > +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> > +
> 
> There's no public specification for this, yet.  How many bits are set
aside for
> the stream id?  Do you need to do bounds checking/input validation?  What
> happens on adapters with older firmware when these bits are set?
> 
> Cheers,
> Jeff

Thanks Jeff for the review! 
The patch depends on Jens' recent io-streamid patch set, and the new NVMe
spec we are trying to get approved.
The patch is probably still too early and we'll push this again when Jens'
patches are released and the new spec goes public.
Thanks,
kwan


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 1/2] added stream id write support
@ 2015-04-21 19:03       ` Hingkwan Huen
  0 siblings, 0 replies; 17+ messages in thread
From: Hingkwan Huen @ 2015-04-21 19:03 UTC (permalink / raw)
  To: 'Jeff Moyer'
  Cc: 'Matthew Wilcox', 'Keith Busch',
	'Jens Axboe', 'Dimitri John Ledkov',
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA



> -----Original Message-----
> From: Jeff Moyer [mailto:jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org]
> Sent: Tuesday, April 21, 2015 6:45 AM
> To: kwan.huen
> Cc: Matthew Wilcox; Keith Busch; Jens Axboe; Dimitri John Ledkov; linux-
> nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-
> api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: [PATCH 1/2] added stream id write support
> 
> "kwan.huen" <kwan.huen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> writes:
> 
> > ---
> >  drivers/block/nvme-core.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> > index 85b8036..332341a 100644
> > --- a/drivers/block/nvme-core.c
> > +++ b/drivers/block/nvme-core.c
> > @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue
> *nvmeq, struct nvme_iod *iod,
> >  	if (req->cmd_flags & REQ_RAHEAD)
> >  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
> >
> > +	if (rq_data_dir(req))
> > +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> > +
> 
> There's no public specification for this, yet.  How many bits are set
aside for
> the stream id?  Do you need to do bounds checking/input validation?  What
> happens on adapters with older firmware when these bits are set?
> 
> Cheers,
> Jeff

Thanks Jeff for the review! 
The patch depends on Jens' recent io-streamid patch set, and the new NVMe
spec we are trying to get approved.
The patch is probably still too early and we'll push this again when Jens'
patches are released and the new spec goes public.
Thanks,
kwan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] added stream id write support
@ 2015-04-21 19:03       ` Hingkwan Huen
  0 siblings, 0 replies; 17+ messages in thread
From: Hingkwan Huen @ 2015-04-21 19:03 UTC (permalink / raw)




> -----Original Message-----
> From: Jeff Moyer [mailto:jmoyer at redhat.com]
> Sent: Tuesday, April 21, 2015 6:45 AM
> To: kwan.huen
> Cc: Matthew Wilcox; Keith Busch; Jens Axboe; Dimitri John Ledkov; linux-
> nvme at lists.infradead.org; linux-kernel at vger.kernel.org; linux-
> api at vger.kernel.org
> Subject: Re: [PATCH 1/2] added stream id write support
> 
> "kwan.huen" <kwan.huen at samsung.com> writes:
> 
> > ---
> >  drivers/block/nvme-core.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> > index 85b8036..332341a 100644
> > --- a/drivers/block/nvme-core.c
> > +++ b/drivers/block/nvme-core.c
> > @@ -769,6 +769,9 @@ static int nvme_submit_iod(struct nvme_queue
> *nvmeq, struct nvme_iod *iod,
> >  	if (req->cmd_flags & REQ_RAHEAD)
> >  		dsmgmt |= NVME_RW_DSM_FREQ_PREFETCH;
> >
> > +	if (rq_data_dir(req))
> > +		dsmgmt |= bio_get_streamid(req->bio) << 8;
> > +
> 
> There's no public specification for this, yet.  How many bits are set
aside for
> the stream id?  Do you need to do bounds checking/input validation?  What
> happens on adapters with older firmware when these bits are set?
> 
> Cheers,
> Jeff

Thanks Jeff for the review! 
The patch depends on Jens' recent io-streamid patch set, and the new NVMe
spec we are trying to get approved.
The patch is probably still too early and we'll push this again when Jens'
patches are released and the new spec goes public.
Thanks,
kwan

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-04-21 19:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21  1:47 Write with Stream ID Support kwan.huen
2015-04-21  1:47 ` kwan.huen
2015-04-21  1:47 ` kwan.huen
2015-04-21  1:47 ` [PATCH 1/2] added stream id write support kwan.huen
2015-04-21  1:47   ` kwan.huen
2015-04-21  1:47   ` kwan.huen
2015-04-21 13:44   ` Jeff Moyer
2015-04-21 13:44     ` Jeff Moyer
2015-04-21 13:44     ` Jeff Moyer
2015-04-21 19:03     ` Hingkwan Huen
2015-04-21 19:03       ` Hingkwan Huen
2015-04-21 19:03       ` Hingkwan Huen
2015-04-21  1:47 ` [PATCH 2/2] added two nvme commands for open/close streams and garbage collection kwan.huen
2015-04-21  1:47   ` kwan.huen
2015-04-21  1:47   ` kwan.huen
2015-04-21 13:21   ` Wilcox, Matthew R
2015-04-21 17:48     ` Kwan (Hingkwan) Huen-SSI

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.