mbox series

[RFC,00/18] blktrace: add blktrace extension support

Message ID 20190501042831.5313-1-chaitanya.kulkarni@wdc.com (mailing list archive)
Headers show
Series blktrace: add blktrace extension support | expand

Message

Chaitanya Kulkarni May 1, 2019, 4:28 a.m. UTC
Hi,

This patch series adds support to track more request based flags and 
different request fields to the blktrace infrastructure.

In this series, we increase the action and action mask field and add 
priority and priority mask field to existing infrastructure.

The userland tools part of the patch-series is followed by this
one, here is the reference:-
Chaitanya Kulkarni (10):
        blktrace.h: add blktrace extension to the header
        blktrace_api.h: update blktrace API header
        act-mask: add blktrace extension to act_mask
        blktrace.c: add support for extensions
        blkparse.c: add support for extensions
        blkparse-fmt.c: add extension support
        iowatcher/blkparse: add extension definitions
        blkiomon: add extension support
        blkrawverify: add extension support
        blktrace-tools: add extension support


Following is the detailed overview of how this patch-series is
organized:-

1. The first few patches focus on adding block trace extension:-

  blktrace: increase the size of action mask
  blktrace: add more definitions for BLK_TC_ACT
  blktrace: update trace to track more actions
  kernel/trace: add KConfig to enable blktrace_ext

2. Next set of patches adds support to track request based priority and
allows the user to configure request priority maks just like action
mask:-

  blktrace: add iopriority mask
  blktrace: add iopriority mask
  blktrace: allow user to track iopriority
  blktrace: add sysfs ioprio mask
  blktrace: add debug support for extension

3. Following patches just set the bio priority so that blktrace will not
report wrong priority while tracing bios:-

  block: set ioprio for write-zeroes, discard etc 
  block: set ioprio for zone-reset
  block: set ioprio for flush bio 
  drivers: set bio iopriority field
  fs: set bio iopriority field
  power/swap: set bio iopriority field
  mm: set bio iopriority field

  Ideally, the above patches for drivers and fs category should be sent
  separately to the respective subsystem for the RFC review purpose I
  kept it all in the one patch.
  

4. Last two patches add support for null_blk driver to specify
module parameter for discard and write-zeroes operations which
makes testing easier:-

  null_blk: add write-zeroes flag to nullb_device
  null_blk: add module param discard/write-zeroes

P.S. I've not added linux-btrace mailing list as I'm having trouble
subscribing to it. 

RFC is little light on the detail but would like to start the discussion
about how should we add extensions to the block trace
infrastructure to track more request operations and priorities.

Regards,
Chaitanya


Chaitanya Kulkarni (18):
  blktrace: increase the size of action mask
  blktrace: add more definitions for BLK_TC_ACT
  blktrace: update trace to track more actions
  kernel/trace: add KConfig to enable blktrace_ext
  blktrace: add iopriority mask
  blktrace: add iopriority mask
  blktrace: allow user to track iopriority
  blktrace: add sysfs ioprio mask
  blktrace: add debug support for extension
  block: set ioprio for write-zeroes, discard etc
  block: set ioprio for zone-reset
  block: set ioprio for flush bio
  drivers: set bio iopriority field
  fs: set bio iopriority field
  power/swap: set bio iopriority field
  mm: set bio iopriority field
  null_blk: add write-zeroes flag to nullb_device
  null_blk: add module param discard/write-zeroes

 block/blk-flush.c                   |   2 +
 block/blk-lib.c                     |   6 +
 block/blk-zoned.c                   |   2 +
 drivers/block/drbd/drbd_actlog.c    |   2 +
 drivers/block/drbd/drbd_bitmap.c    |   3 +
 drivers/block/null_blk.h            |   1 +
 drivers/block/null_blk_main.c       |  37 +++-
 drivers/block/xen-blkback/blkback.c |   3 +
 drivers/block/zram/zram_drv.c       |   2 +
 drivers/lightnvm/pblk-read.c        |   2 +
 drivers/lightnvm/pblk-write.c       |   1 +
 drivers/md/bcache/journal.c         |   2 +
 drivers/md/bcache/super.c           |   2 +
 drivers/md/dm-bufio.c               |   2 +
 drivers/md/dm-cache-target.c        |   1 +
 drivers/md/dm-io.c                  |   2 +
 drivers/md/dm-log-writes.c          |   5 +
 drivers/md/dm-thin.c                |   1 +
 drivers/md/dm-writecache.c          |   2 +
 drivers/md/dm-zoned-metadata.c      |   4 +
 drivers/md/md.c                     |   4 +
 drivers/md/raid5-cache.c            |   4 +
 drivers/md/raid5-ppl.c              |   3 +
 drivers/nvme/target/io-cmd-bdev.c   |   7 +
 drivers/staging/erofs/internal.h    |   3 +
 drivers/target/target_core_iblock.c |   3 +
 fs/btrfs/disk-io.c                  |   2 +
 fs/btrfs/extent_io.c                |   3 +
 fs/btrfs/raid56.c                   |   6 +
 fs/btrfs/scrub.c                    |   2 +
 fs/btrfs/volumes.c                  |   3 +
 fs/buffer.c                         |   2 +
 fs/crypto/bio.c                     |   3 +
 fs/direct-io.c                      |   2 +
 fs/ext4/page-io.c                   |   2 +
 fs/ext4/readpage.c                  |   1 +
 fs/f2fs/data.c                      |   3 +
 fs/f2fs/segment.c                   |   1 +
 fs/gfs2/lops.c                      |   2 +
 fs/gfs2/meta_io.c                   |   2 +
 fs/gfs2/ops_fstype.c                |   2 +
 fs/hfsplus/wrapper.c                |   2 +
 fs/iomap.c                          |   2 +
 fs/jfs/jfs_logmgr.c                 |   3 +
 fs/jfs/jfs_metapage.c               |   3 +
 fs/mpage.c                          |   1 +
 fs/nfs/blocklayout/blocklayout.c    |   2 +
 fs/nilfs2/segbuf.c                  |   2 +
 fs/ocfs2/cluster/heartbeat.c        |   2 +
 fs/xfs/xfs_aops.c                   |   3 +
 fs/xfs/xfs_buf.c                    |   2 +
 include/linux/blktrace_api.h        |  13 +-
 include/uapi/linux/blktrace_api.h   |  65 ++++--
 kernel/power/swap.c                 |   2 +
 kernel/trace/Kconfig                |  36 ++++
 kernel/trace/blktrace.c             | 323 +++++++++++++++++++++++++++-
 mm/page_io.c                        |   2 +
 57 files changed, 579 insertions(+), 26 deletions(-)