linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/16] block: add blktrace support for zoned block devi
@ 2025-10-15 10:54 Johannes Thumshirn
  2025-10-15 10:54 ` [PATCH v3 01/16] blktrace: only calculate trace length once Johannes Thumshirn
                   ` (15 more replies)
  0 siblings, 16 replies; 27+ messages in thread
From: Johannes Thumshirn @ 2025-10-15 10:54 UTC (permalink / raw)
  To: axboe
  Cc: chaitanyak, dlemoal, hare, hch, john.g.garry, linux-block,
	linux-btrace, linux-kernel, linux-trace-kernel, martin.petersen,
	mathieu.desnoyers, mhiramat, naohiro.aota, rostedt,
	shinichiro.kawasaki, Johannes Thumshirn

This patch series extends the kernel blktrace infrastructure to support
tracing zoned block device commands. Zoned block devices (e.g., ZAC/ZBC and
ZNS) introduce command types such as zone open, close, reset, finish, and zone
append. These are currently not visible in blktrace, making it difficult to
debug and analyze I/O workloads on zoned devices.

The patches in this series utilize the new trace points for these zone
management operations, and propagate the necessary context to the blktrace
logging path. These additions are designed to be backward-compatible, and are
only active when zoned devices are in use.

In order to not break the user-space ABI, a new ioctl was introduced to
request the new version of the blk_io_trace with extended 'action' field.

The user-space tools in the blktrace suite are updated in a separate patch
series to interpret and display the new trace events.This patch series extends
the kernel blktrace infrastructure to support tracing zoned block device
commands. Zoned block devices (e.g., ZAC/ZBC and ZNS) introduce command types
such as zone open, close, reset, finish, and zone append. These are currently
not visible in blktrace, making it difficult to debug and analyze I/O
workloads on zoned devices.

The patches in this series utilize the new trace points for these zone
management operations, and propagate the necessary context to the blktrace
logging path. These additions are designed to be backward-compatible, and are
only active when zoned devices are in use.

In order to not break the user-space ABI, a new ioctl was introduced to
request the new version of the blk_io_trace with extended 'action' field.

The user-space tools in the blktrace suite are updated in a separate patch
series to interpret and display the new trace events.

I've tested on SMR drives, TCMU emulated SMR drives and zloop, with both XFS
and BTRFS as filesystems on top of the hardwdare. Testing of different
hardware/setups is highly encouraged.

Changes to v2:
- Collect Reviewed-bys
- Convert trace_note and ftrace's blk_io_tracer to blk_io_trace2
- Don't play games with the layout of the 'action' field
- Fix structure alignments
- Drop Zone Management trace action, it's a command not an action

Johannes Thumshirn (16):
  blktrace: only calculate trace length once
  blktrace: factor out recording a blktrace event
  blktrace: split out relaying a blktrace event
  blktrace: untangle if/else sequence in __blk_add_trace
  blktrace: change the internal action to 64bit
  blktrace: split do_blk_trace_setup into two functions
  blktrace: add definitions for blk_user_trace_setup2
  blktrace: pass blk_user_trace2 to setup functions
  blktrace: add definitions for struct blk_io_trace2
  blktrace: differentiate between blk_io_trace versions
  blktrace: move trace_note to blk_io_trace2
  blktrace: move ftrace blk_io_tracer to blk_io_trace2
  blktrace: add block trace commands for zone operations
  blktrace: expose ZONE APPEND completions to blktrace
  blktrace: trace zone write plugging operations
  blktrace: handle BLKTRACESETUP2 ioctl

 block/ioctl.c                     |   1 +
 include/linux/blktrace_api.h      |   3 +-
 include/uapi/linux/blktrace_api.h |  53 +++-
 include/uapi/linux/fs.h           |   1 +
 kernel/trace/blktrace.c           | 463 ++++++++++++++++++++++--------
 5 files changed, 400 insertions(+), 121 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-20 10:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-15 10:54 [PATCH v3 00/16] block: add blktrace support for zoned block devi Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 01/16] blktrace: only calculate trace length once Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 02/16] blktrace: factor out recording a blktrace event Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 03/16] blktrace: split out relaying " Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 04/16] blktrace: untangle if/else sequence in __blk_add_trace Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 05/16] blktrace: change the internal action to 64bit Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 06/16] blktrace: split do_blk_trace_setup into two functions Johannes Thumshirn
2025-10-16  7:01   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 07/16] blktrace: add definitions for blk_user_trace_setup2 Johannes Thumshirn
2025-10-16  7:05   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 08/16] blktrace: pass blk_user_trace2 to setup functions Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 09/16] blktrace: add definitions for struct blk_io_trace2 Johannes Thumshirn
2025-10-16  7:06   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 10/16] blktrace: differentiate between blk_io_trace versions Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 11/16] blktrace: move trace_note to blk_io_trace2 Johannes Thumshirn
2025-10-16  7:06   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 12/16] blktrace: move ftrace blk_io_tracer " Johannes Thumshirn
2025-10-16  7:07   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 13/16] blktrace: add block trace commands for zone operations Johannes Thumshirn
2025-10-16  7:08   ` Christoph Hellwig
2025-10-20 10:57     ` Johannes Thumshirn
2025-10-15 10:54 ` [PATCH v3 14/16] blktrace: expose ZONE APPEND completions to blktrace Johannes Thumshirn
2025-10-16  7:09   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 15/16] blktrace: trace zone write plugging operations Johannes Thumshirn
2025-10-16  7:09   ` Christoph Hellwig
2025-10-15 10:54 ` [PATCH v3 16/16] blktrace: handle BLKTRACESETUP2 ioctl Johannes Thumshirn
2025-10-16  7:11   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).