* [PATCH v2 0/3] *** nvme: add some commands tracing ***
@ 2024-01-31 9:12 Guixin Liu
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Guixin Liu @ 2024-01-31 9:12 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Hi guys:
I found that there are no reservation commands tracing and some
commands's parsing aren't fit the newest NVMe spec, and aren't readble.
Changes from v1 to v2:
- Remove idr and idw parsing of dsm command.
- Remove lbafl and lbafu variables and add a comment for the lbaf
calculation in nvme_trace_admin_format_nvm().
Guixin Liu (3):
nvme: add tracing of reservation commands
nvme: parse dsm command's attr deallocate when tracing
nvme: parse format command's lbafu when tracing
drivers/nvme/host/trace.c | 73 ++++++++++++++++++++++++++++++++++++---
1 file changed, 69 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/3] nvme: add tracing of reservation commands
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
@ 2024-01-31 9:12 ` Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:31 ` Christoph Hellwig
2024-01-31 9:12 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing Guixin Liu
` (3 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Guixin Liu @ 2024-01-31 9:12 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Add detailed parsing of reservation commands to make the trace log
more consistent and human-readable.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/host/trace.c | 62 +++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 1c36fcedea20..95572c85b22a 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -191,6 +191,60 @@ static const char *nvme_trace_zone_mgmt_recv(struct trace_seq *p, u8 *cdw10)
return ret;
}
+static const char *nvme_trace_resv_reg(struct trace_seq *p, u8 *cdw10)
+{
+ const char *ret = trace_seq_buffer_ptr(p);
+ u8 rrega = cdw10[0] & 0x7;
+ u8 iekey = (cdw10[0] >> 3) & 0x1;
+ u8 ptpl = (cdw10[3] >> 6) & 0x3;
+
+ trace_seq_printf(p, "rrega=%u, iekey=%u, ptpl=%u",
+ rrega, iekey, ptpl);
+ trace_seq_putc(p, 0);
+
+ return ret;
+}
+
+static const char *nvme_trace_resv_acq(struct trace_seq *p, u8 *cdw10)
+{
+ const char *ret = trace_seq_buffer_ptr(p);
+ u8 racqa = cdw10[0] & 0x7;
+ u8 iekey = (cdw10[0] >> 3) & 0x1;
+ u8 rtype = cdw10[1];
+
+ trace_seq_printf(p, "racqa=%u, iekey=%u, rtype=%u",
+ racqa, iekey, rtype);
+ trace_seq_putc(p, 0);
+
+ return ret;
+}
+
+static const char *nvme_trace_resv_rel(struct trace_seq *p, u8 *cdw10)
+{
+ const char *ret = trace_seq_buffer_ptr(p);
+ u8 rrela = cdw10[0] & 0x7;
+ u8 iekey = (cdw10[0] >> 3) & 0x1;
+ u8 rtype = cdw10[1];
+
+ trace_seq_printf(p, "rrela=%u, iekey=%u, rtype=%u",
+ rrela, iekey, rtype);
+ trace_seq_putc(p, 0);
+
+ return ret;
+}
+
+static const char *nvme_trace_resv_report(struct trace_seq *p, u8 *cdw10)
+{
+ const char *ret = trace_seq_buffer_ptr(p);
+ u32 numd = get_unaligned_le32(cdw10);
+ u8 eds = cdw10[4] & 0x1;
+
+ trace_seq_printf(p, "numd=%u, eds=%u", numd, eds);
+ trace_seq_putc(p, 0);
+
+ return ret;
+}
+
static const char *nvme_trace_common(struct trace_seq *p, u8 *cdw10)
{
const char *ret = trace_seq_buffer_ptr(p);
@@ -243,6 +297,14 @@ const char *nvme_trace_parse_nvm_cmd(struct trace_seq *p,
return nvme_trace_zone_mgmt_send(p, cdw10);
case nvme_cmd_zone_mgmt_recv:
return nvme_trace_zone_mgmt_recv(p, cdw10);
+ case nvme_cmd_resv_register:
+ return nvme_trace_resv_reg(p, cdw10);
+ case nvme_cmd_resv_acquire:
+ return nvme_trace_resv_acq(p, cdw10);
+ case nvme_cmd_resv_release:
+ return nvme_trace_resv_rel(p, cdw10);
+ case nvme_cmd_resv_report:
+ return nvme_trace_resv_report(p, cdw10);
default:
return nvme_trace_common(p, cdw10);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
@ 2024-01-31 9:12 ` Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:32 ` Christoph Hellwig
2024-01-31 9:12 ` [PATCH v2 3/3] nvme: parse format command's lbafu " Guixin Liu
` (2 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Guixin Liu @ 2024-01-31 9:12 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Add parse of dsm command's attr deallocate to make the trace log
more consistent and human-readable.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/host/trace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 95572c85b22a..4b8924abb4e1 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -153,10 +153,10 @@ static const char *nvme_trace_read_write(struct trace_seq *p, u8 *cdw10)
static const char *nvme_trace_dsm(struct trace_seq *p, u8 *cdw10)
{
const char *ret = trace_seq_buffer_ptr(p);
+ u8 nr = cdw10[0];
+ u8 ad = (cdw10[4] >> 2) & 0x1;
- trace_seq_printf(p, "nr=%u, attributes=%u",
- get_unaligned_le32(cdw10),
- get_unaligned_le32(cdw10 + 4));
+ trace_seq_printf(p, "nr=%u, ad=%u", nr, ad);
trace_seq_putc(p, 0);
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/3] nvme: parse format command's lbafu when tracing
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
2024-01-31 9:12 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing Guixin Liu
@ 2024-01-31 9:12 ` Guixin Liu
2024-01-31 17:32 ` Christoph Hellwig
2024-01-31 23:08 ` [PATCH v2 0/3] *** nvme: add some commands tracing *** Chaitanya Kulkarni
2024-03-13 3:51 ` Guixin Liu
4 siblings, 1 reply; 14+ messages in thread
From: Guixin Liu @ 2024-01-31 9:12 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Add the parse of format command's lbafu to calculate lbaf.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/host/trace.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 4b8924abb4e1..7b752ee47f36 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -119,7 +119,10 @@ static const char *nvme_trace_get_lba_status(struct trace_seq *p,
static const char *nvme_trace_admin_format_nvm(struct trace_seq *p, u8 *cdw10)
{
const char *ret = trace_seq_buffer_ptr(p);
- u8 lbaf = cdw10[0] & 0xF;
+ /*
+ * lbafu(bit 13:12) is already in the upper 4 bits, lbafl: bit 03:00.
+ */
+ u8 lbaf = (cdw10[1] & 0x30) | (cdw10[0] & 0xF);
u8 mset = (cdw10[0] >> 4) & 0x1;
u8 pi = (cdw10[0] >> 5) & 0x7;
u8 pil = cdw10[1] & 0x1;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] nvme: add tracing of reservation commands
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
@ 2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:31 ` Christoph Hellwig
1 sibling, 0 replies; 14+ messages in thread
From: Sagi Grimberg @ 2024-01-31 12:59 UTC (permalink / raw)
To: Guixin Liu, kbusch, axboe, hch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing
2024-01-31 9:12 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing Guixin Liu
@ 2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:32 ` Christoph Hellwig
1 sibling, 0 replies; 14+ messages in thread
From: Sagi Grimberg @ 2024-01-31 12:59 UTC (permalink / raw)
To: Guixin Liu, kbusch, axboe, hch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] nvme: add tracing of reservation commands
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
@ 2024-01-31 17:31 ` Christoph Hellwig
1 sibling, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2024-01-31 17:31 UTC (permalink / raw)
To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing
2024-01-31 9:12 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
@ 2024-01-31 17:32 ` Christoph Hellwig
1 sibling, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2024-01-31 17:32 UTC (permalink / raw)
To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] nvme: parse format command's lbafu when tracing
2024-01-31 9:12 ` [PATCH v2 3/3] nvme: parse format command's lbafu " Guixin Liu
@ 2024-01-31 17:32 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2024-01-31 17:32 UTC (permalink / raw)
To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] *** nvme: add some commands tracing ***
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
` (2 preceding siblings ...)
2024-01-31 9:12 ` [PATCH v2 3/3] nvme: parse format command's lbafu " Guixin Liu
@ 2024-01-31 23:08 ` Chaitanya Kulkarni
2024-02-01 2:03 ` Guixin Liu
2024-03-13 3:51 ` Guixin Liu
4 siblings, 1 reply; 14+ messages in thread
From: Chaitanya Kulkarni @ 2024-01-31 23:08 UTC (permalink / raw)
To: Guixin Liu; +Cc: linux-nvme, kbusch, sagi, axboe, hch
Guixin,
On 1/31/24 01:12, Guixin Liu wrote:
> Hi guys:
> I found that there are no reservation commands tracing and some
> commands's parsing aren't fit the newest NVMe spec, and aren't readble.
>
> Changes from v1 to v2:
> - Remove idr and idw parsing of dsm command.
>
> - Remove lbafl and lbafu variables and add a comment for the lbaf
> calculation in nvme_trace_admin_format_nvm().
>
> Guixin Liu (3):
> nvme: add tracing of reservation commands
> nvme: parse dsm command's attr deallocate when tracing
> nvme: parse format command's lbafu when tracing
>
> drivers/nvme/host/trace.c | 73 ++++++++++++++++++++++++++++++++++++---
> 1 file changed, 69 insertions(+), 4 deletions(-)
>
One suggestion can you please not add *** in the subject line ? that
is not a common practice on the mailing list.
This series addresses the comments posted in the last version.
Looks good, for the entire series :-
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] *** nvme: add some commands tracing ***
2024-01-31 23:08 ` [PATCH v2 0/3] *** nvme: add some commands tracing *** Chaitanya Kulkarni
@ 2024-02-01 2:03 ` Guixin Liu
0 siblings, 0 replies; 14+ messages in thread
From: Guixin Liu @ 2024-02-01 2:03 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: linux-nvme, kbusch, sagi, axboe, hch
在 2024/2/1 07:08, Chaitanya Kulkarni 写道:
> Guixin,
>
> On 1/31/24 01:12, Guixin Liu wrote:
>> Hi guys:
>> I found that there are no reservation commands tracing and some
>> commands's parsing aren't fit the newest NVMe spec, and aren't readble.
>>
>> Changes from v1 to v2:
>> - Remove idr and idw parsing of dsm command.
>>
>> - Remove lbafl and lbafu variables and add a comment for the lbaf
>> calculation in nvme_trace_admin_format_nvm().
>>
>> Guixin Liu (3):
>> nvme: add tracing of reservation commands
>> nvme: parse dsm command's attr deallocate when tracing
>> nvme: parse format command's lbafu when tracing
>>
>> drivers/nvme/host/trace.c | 73 ++++++++++++++++++++++++++++++++++++---
>> 1 file changed, 69 insertions(+), 4 deletions(-)
>>
> One suggestion can you please not add *** in the subject line ? that
> is not a common practice on the mailing list.
>
> This series addresses the comments posted in the last version.
> Looks good, for the entire series :-
>
> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
>
> -ck
Oh, Sorry, I dont notice that, just change the "SUBJECT HERE" of
cover-letter, I will pay attention of that.
Best regards,
Guixin Liu
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] *** nvme: add some commands tracing ***
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
` (3 preceding siblings ...)
2024-01-31 23:08 ` [PATCH v2 0/3] *** nvme: add some commands tracing *** Chaitanya Kulkarni
@ 2024-03-13 3:51 ` Guixin Liu
2024-03-14 18:41 ` Keith Busch
4 siblings, 1 reply; 14+ messages in thread
From: Guixin Liu @ 2024-03-13 3:51 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Hi Keith,
This series of patches has not been combined yet, could you please
take a look?
Best regards,
Guixin Liu
在 2024/1/31 17:12, Guixin Liu 写道:
> Hi guys:
> I found that there are no reservation commands tracing and some
> commands's parsing aren't fit the newest NVMe spec, and aren't readble.
>
> Changes from v1 to v2:
> - Remove idr and idw parsing of dsm command.
>
> - Remove lbafl and lbafu variables and add a comment for the lbaf
> calculation in nvme_trace_admin_format_nvm().
>
> Guixin Liu (3):
> nvme: add tracing of reservation commands
> nvme: parse dsm command's attr deallocate when tracing
> nvme: parse format command's lbafu when tracing
>
> drivers/nvme/host/trace.c | 73 ++++++++++++++++++++++++++++++++++++---
> 1 file changed, 69 insertions(+), 4 deletions(-)
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/3] *** nvme: add some commands tracing ***
2024-03-13 3:51 ` Guixin Liu
@ 2024-03-14 18:41 ` Keith Busch
0 siblings, 0 replies; 14+ messages in thread
From: Keith Busch @ 2024-03-14 18:41 UTC (permalink / raw)
To: Guixin Liu; +Cc: axboe, hch, sagi, linux-nvme
On Wed, Mar 13, 2024 at 11:51:49AM +0800, Guixin Liu wrote:
> Hi Keith,
>
> This series of patches has not been combined yet, could you please
>
> take a look?
Added to nvme-6.9, thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 0/3] *** nvme: add some commands tracing ***
@ 2024-01-30 11:34 Guixin Liu
0 siblings, 0 replies; 14+ messages in thread
From: Guixin Liu @ 2024-01-30 11:34 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Hi guys:
I found that there are no reservation commands tracing and some
commands's parsing aren't fit the newest NVMe spec, and aren't readble.
Changes from v1 to v2:
- Remove idr and idw parsing of dsm command.
- Remove lbafl and lbafu variables and add a comment for the lbaf
calculation in nvme_trace_admin_format_nvm().
Guixin Liu (3):
nvme: add tracing of reservation commands
nvme: parse dsm command's attr deallocate when tracing
nvme: parse format command's lbafu when tracing
drivers/nvme/host/trace.c | 73 ++++++++++++++++++++++++++++++++++++---
1 file changed, 69 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-03-14 18:42 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-31 9:12 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:31 ` Christoph Hellwig
2024-01-31 9:12 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate when tracing Guixin Liu
2024-01-31 12:59 ` Sagi Grimberg
2024-01-31 17:32 ` Christoph Hellwig
2024-01-31 9:12 ` [PATCH v2 3/3] nvme: parse format command's lbafu " Guixin Liu
2024-01-31 17:32 ` Christoph Hellwig
2024-01-31 23:08 ` [PATCH v2 0/3] *** nvme: add some commands tracing *** Chaitanya Kulkarni
2024-02-01 2:03 ` Guixin Liu
2024-03-13 3:51 ` Guixin Liu
2024-03-14 18:41 ` Keith Busch
-- strict thread matches above, loose matches on Subject: below --
2024-01-30 11:34 Guixin Liu
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.