Thread (2 messages) 2 messages, 2 authors, 2024-08-27

Re: [PATCH] blktrace: Add 'P' identifier to mark I/O with REQ_POLLED flag

From: Chao Yu <chao@kernel.org>
Date: 2024-08-27 02:15:32
Also in: linux-trace-kernel

On 2024/8/23 15:25, Yongpeng Yang wrote:
quoted hunk ↗ jump to hunk
blk_fill_rwbs function currently does not recognize REQ_POLLED I/O,
it's not convenient to trace the I/O handling process on the
HCTX_TYPE_POLL type hardware queue. Add a 'P' identifier to 'rwbs'
to mark such I/O for tracing.

Signed-off-by: Yongpeng Yang <redacted>
---
  kernel/trace/blktrace.c | 2 ++
  1 file changed, 2 insertions(+)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 8fd292d34d89..69b7857d0189 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1908,6 +1908,8 @@ void blk_fill_rwbs(char *rwbs, blk_opf_t opf)
  		rwbs[i++] = 'S';
  	if (opf & REQ_META)
  		rwbs[i++] = 'M';
+	if (opf & REQ_POLLED)
+		rwbs[i++] = 'P';
DECLARE_EVENT_CLASS(bio,
	TP_PROTO(struct bio *bio),
	TP_ARGS(bio),

	TP_STRUCT__entry(
		__field(dev_t,		dev			)
		__field(sector_t,	sector			)
		__field(unsigned int,	nr_sector		)
		__array(char,		rwbs,	6		)
	),

Not sure, maybe we need to expand one more byte for rwbs array, if
REQ_POLLED flag can be Ored w/ other flags.

Thanks,
  
  	rwbs[i] = '\0';
  }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help