[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251015105658.527262-19-johannes.thumshirn@wdc.com>
Date: Wed, 15 Oct 2025 12:56:56 +0200
From: Johannes Thumshirn <johannes.thumshirn@....com>
To: axboe@...nel.dk
Cc: chaitanyak@...dia.com,
dlemoal@...nel.org,
hare@...e.de,
hch@....de,
john.g.garry@...cle.com,
linux-block@...r.kernel.org,
linux-btrace@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
martin.petersen@...cle.com,
mathieu.desnoyers@...icios.com,
mhiramat@...nel.org,
naohiro.aota@....com,
rostedt@...dmis.org,
shinichiro.kawasaki@....com,
Johannes Thumshirn <johannes.thumshirn@....com>
Subject: [PATCH blktrace v3 18/20] blkparse: parse zone (un)plug actions
Parse Zone Write Plugging plug and unplug actions in blkparse.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....com>
---
blkparse.c | 7 +++++++
blkparse_fmt.c | 18 ++++++++++++++++++
blktrace_api.h | 2 ++
3 files changed, 27 insertions(+)
diff --git a/blkparse.c b/blkparse.c
index 2eec3a9..76c775b 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -1722,6 +1722,13 @@ static void dump_trace_fs(struct blk_io_trace2 *t, struct per_dev_info *pdi,
account_unplug(t, pci, 1);
log_unplug(pci, t, "UT");
break;
+ case __BLK_TA_ZONE_PLUG:
+ log_action(pci, t, "ZP");
+ break;
+ case __BLK_TA_ZONE_UNPLUG:
+ account_unplug(t, pci, 0);
+ log_unplug(pci, t, "ZU");
+ break;
case __BLK_TA_SPLIT:
log_track_split(pdi, t);
log_split(pci, t, "X");
diff --git a/blkparse_fmt.c b/blkparse_fmt.c
index f93addb..80e02fc 100644
--- a/blkparse_fmt.c
+++ b/blkparse_fmt.c
@@ -301,6 +301,21 @@ static char *parse_field(char *act, struct per_cpu_info *pci,
return p;
}
+static void process_zoned(char *act, struct blk_io_trace2 *t, char *name)
+{
+ switch (act[1]) {
+ case 'P': /* Zone Plug */
+ fprintf(ofp, "[%s]\n", name);
+ break;
+ case 'U': /* Zone Unplug */
+ fprintf(ofp, "[%s] %u\n", name, get_pdu_int(t));
+ break;
+ default:
+ fprintf(stderr, "Unknown zoned action %c\n", act[1]);
+ break;
+ }
+}
+
static void process_default(char *act, struct per_cpu_info *pci,
struct blk_io_trace2 *t, unsigned long long elapsed,
int pdu_len, unsigned char *pdu_buf)
@@ -429,6 +444,9 @@ static void process_default(char *act, struct per_cpu_info *pci,
fprintf(ofp, "%*s\n", pdu_len, pdu_buf);
break;
+ case 'Z': /* Zoned command */
+ process_zoned(act, t, name);
+ break;
default:
fprintf(stderr, "Unknown action %c\n", act[0]);
break;
diff --git a/blktrace_api.h b/blktrace_api.h
index 04e81de..8db24fc 100644
--- a/blktrace_api.h
+++ b/blktrace_api.h
@@ -60,6 +60,8 @@ enum {
__BLK_TA_REMAP, /* bio was remapped */
__BLK_TA_ABORT, /* request aborted */
__BLK_TA_DRV_DATA, /* binary driver data */
+ __BLK_TA_ZONE_PLUG, /* zone write plug was plugged */
+ __BLK_TA_ZONE_UNPLUG, /* zone write plug was unplugged */
__BLK_TA_ZONE_MGMT, /* zone management command was issued */
__BLK_TA_CGROUP = 1 << 8,
};
--
2.51.0
Powered by blists - more mailing lists