mbox series

[V2,0/3] null_blk: add tracnepoints for zoned mode

Message ID 20200218172840.4097-1-chaitanya.kulkarni@wdc.com (mailing list archive)
Headers show
Series null_blk: add tracnepoints for zoned mode | expand

Message

Chaitanya Kulkarni Feb. 18, 2020, 5:28 p.m. UTC
Hi,

Recently we've added several new operations for zoned block devices
blk-zone.c ZBD). These operations have a direct effect on the
zone-state machine present in the null_blk_zoned.c. 

This will allow us to add new testcases in blktests in order to verify
the correct operations on the driver side.

This is a small patch series which adds tracepoints for the null_blk
block driver when configured in a zoned mode (with command line
parameter zoned=1).

The first patch is a prep patch that adds a helper to stringify zone
conditions which we use in the trace, the second patch adds new
tracepoint definitions and the third patch allows null_blk_zoned to
trace operations.

Please have a look at the end for sample output.

The change-log is present in the respective patches.

Regards,
Chaitanya              


Chaitanya Kulkarni (3):
  block: add a zone condition debug helper
  null_blk: add tracepoint helpers for zoned mode
  null_blk: add trace in null_blk_zoned.c

 block/blk-zoned.c              | 32 ++++++++++++++
 drivers/block/Makefile         |  3 ++
 drivers/block/null_blk_trace.c | 20 +++++++++
 drivers/block/null_blk_trace.h | 78 ++++++++++++++++++++++++++++++++++
 drivers/block/null_blk_zoned.c | 12 +++++-
 include/linux/blkdev.h         | 10 +++++
 6 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 drivers/block/null_blk_trace.c
 create mode 100644 drivers/block/null_blk_trace.h


Sample Test Output :-

# modprobe null_blk zoned=1 zone_size=128 gb=1 bs=4096
# cd /sys/kernel/debug/tracing/
# echo 1 > events/nullb/enable; cat trace_pipe 
# for i in open close finish reset; do blkzone $i /dev/nullb0; done 
# dd if=/dev/zero of=/dev/nullb0 bs=4k count=5

nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=0 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=1 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=2 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=3 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=4 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=5 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=6 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_OPEN       zone_no=7 zone_cond=EXP_OPEN  
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=0 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=1 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=2 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=3 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=4 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=5 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=6 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_CLOSE      zone_no=7 zone_cond=EMPTY     
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=0 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=1 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=2 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=3 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=4 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=5 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=6 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_FINISH     zone_no=7 zone_cond=FULL      
nullb_zone_op: disk=nullb0,  req=ZONE_RESET_ALL  zone_no=0 zone_cond=EMPTY 
nullb_zone_op: disk=nullb0,  req=WRITE           zone_no=0 zone_cond=IMP_OPEN  
nullb_zone_op: disk=nullb0,  req=WRITE           zone_no=0 zone_cond=IMP_OPEN  
nullb_zone_op: disk=nullb0,  req=WRITE           zone_no=0 zone_cond=IMP_OPEN  
nullb_zone_op: disk=nullb0,  req=WRITE           zone_no=0 zone_cond=IMP_OPEN  
nullb_zone_op: disk=nullb0,  req=WRITE           zone_no=0 zone_cond=IMP_OPEN

Comments

Chaitanya Kulkarni Feb. 19, 2020, 2:13 a.m. UTC | #1
Jens please ignore this, I'll send a new one.

On 02/18/2020 09:28 AM, Chaitanya Kulkarni wrote:
> Hi,
>
> Recently we've added several new operations for zoned block devices
> blk-zone.c ZBD). These operations have a direct effect on the
> zone-state machine present in the null_blk_zoned.c.
>
> This will allow us to add new testcases in blktests in order to verify
> the correct operations on the driver side.
>
> This is a small patch series which adds tracepoints for the null_blk
> block driver when configured in a zoned mode (with command line
> parameter zoned=1).
>
> The first patch is a prep patch that adds a helper to stringify zone
> conditions which we use in the trace, the second patch adds new
> tracepoint definitions and the third patch allows null_blk_zoned to
> trace operations.
>
> Please have a look at the end for sample output.
>
> The change-log is present in the respective patches.
>
> Regards,
> Chaitanya
Christoph Hellwig Feb. 19, 2020, 4:29 p.m. UTC | #2
s/tracnepoints/tracepoints/ ?
Chaitanya Kulkarni Feb. 19, 2020, 5:44 p.m. UTC | #3
On 02/19/2020 08:29 AM, Christoph Hellwig wrote:
> s/tracnepoints/tracepoints/ ?
>

Thanks will fix in next version.