Re: [PATCH v5] scsi: ufs: core: Add trace event for MCQ

From: Ziqi Chen
Date: Tue Mar 14 2023 - 05:40:13 EST


Thanks Bart, will address your comments and update new version V6 soon.

Best Regards,
Ziqi

On 3/14/2023 5:09 AM, Bart Van Assche wrote:
On 3/13/23 02:16, Ziqi Chen wrote:
Added a new trace event to record MCQ relevant information
for each request in MCQ mode, include hardware queue ID,
SQ tail slot, CQ head slot and CQ tail slot.

Added a new trace event ... -> Add the MCQ information in the existing trace event ...

From Documentation/process/submitting-patches.rst: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz"".

Changes to v1:
- Adjust the order of fileds to keep them aligned.
                        ^^^^^^
                        fields?

-    u32 intr, doorbell;
+    u32 doorbell = 0, hwq_id = 0;
+    u32 intr;

Since hwq_id can be assigned the value -1, shouldn't its type be changed from u32 into int, int16_t or int32_t?

+    struct ufs_hw_queue *hwq = NULL;

Is this pointer only used inside one branch of the if-statement below? If so, can it be moved under "if (is_mcq_enabled(hba)) {"?

+        "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x, hqid: %d",

Consider changing "hqid" into "hwq_id" to make the trace information easier to understand.

Thanks,

Bart.