scsi: ufs: support IO traces for zoned block device
Subsystems (3)
PATCH 1/1 scsi: ufs: support IO traces for zoned block device
From: Jaegeuk Kim <[email protected]>
Let's support WRITE_16, READ_16, ZBC_IN, ZBC_OUT.
--- drivers/ufs/core/ufshcd.c | 8 ++++---- include/trace/events/ufs.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-)
drivers/ufs/core/ufshcd.c +4 -4
@@ -402,15 +402,15 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, opcode = cmd->cmnd[0 ]; -if (opcode ==READ_10 || opcode ==WRITE_10 ) { -/* -* Currently we only fully trace read(10) and write(10) commands -*/ +if (opcode ==READ_10 || opcode ==WRITE_10 || + opcode ==READ_16 || opcode ==WRITE_16 ) { transfer_len =be32_to_cpu (lrbp->ucd_req_ptr->sc.exp_data_transfer_len); lba =scsi_get_lba (cmd);if (opcode ==WRITE_10 ) group_id = lrbp->cmd->cmnd[6 ]; +if (opcode ==WRITE_16 ) + group_id = lrbp->cmd->cmnd[14 ]; }else if (opcode ==UNMAP ) {/* * The number of Bytes to be unmapped beginning with the lba.
include/trace/events/ufs.h +3 -1
@@ -18,7 +18,9 @@ { READ_16, "READ_16" }, \ { READ_10, "READ_10" }, \ { SYNCHRONIZE_CACHE, "SYNC" }, \ - { UNMAP, "UNMAP" }) + { UNMAP, "UNMAP" }, \ + { ZBC_IN, "ZBC_IN" }, \ + { ZBC_OUT, "ZBC_OUT" }) #define UFS_LINK_STATES \EM (UIC_LINK_OFF_STATE ,"UIC_LINK_OFF_STATE" ) \
Signature · 1 line
2.39.1.581.gbfd45094c4-goog
Quoted 1 line · Jaegeuk Kim
Let's support
WRITE_16,READ_16,ZBC_IN,ZBC_OUT.
Why does UFS even have it's own common tracing instad of just relying on the core SCSI one, and even worse pokes into command set specifics which is a no-go for LLDDs. This code simply needs to go away instead of beeing "enhanced".
Quoted 4 lines · Christoph Hellwig
Why does UFS even have it's own common tracing instad of just relying on the core SCSI one, and even worse pokes into command set specifics which is a no-go for LLDDs. This code simply needs to go away instead of beeing "enhanced".
I'm not sure how all the other vendors use the trace tho, at least to me, it's quite useful when debugging any UFS-specific information such as group_id and doorbell status along with the attached scsi command, in addition to the accurate latency measurements.
Avri Altman
reviewerQuoted 11 lines · Christoph Hellwig
Quoted 4 lines
Why does UFS even have it's own common tracing instad of just relying on the core SCSI one, and even worse pokes into command set specifics which is a no-go for LLDDs. This code simply needs to go away instead of beeing "enhanced".
I'm not sure how all the other vendors use the trace tho, at least to me, it's quite useful when debugging any UFS-specific information such as
group_idand doorbell status along with the attached scsi command, in addition to the accurate latency measurements.
For us as well.
Moreover, we are mainly using upiu tracing which is not available at scsi ML.
Thanks,
Avri
Quoted 4 lines · Avri Altman
Quoted 2 lines
doorbell status along with the attached scsi command, in addition to the accurate latency measurements.
For us as well.
Moreover, we are mainly using upiu tracing which is not available at scsi ML.
So let's rework the tracepoints to work at the UPIU level and stop the gracious poking into SCSI CDBs.
Quoted 9 lines · Jaegeuk Kim
Quoted 4 lines · Christoph Hellwig
Why does UFS even have it's own common tracing instad of just relying on the core SCSI one, and even worse pokes into command set specifics which is a no-go for LLDDs. This code simply needs to go away instead of beeing "enhanced".
I'm not sure how all the other vendors use the trace tho, at least to me, it's quite useful when debugging any UFS-specific information such as
group_id
The group ID isn't even ever set, how can it be useful to you?