public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ziqi Chen <quic_ziqichen@quicinc.com>
To: Bart Van Assche <bvanassche@acm.org>, <quic_asutoshd@quicinc.com>,
	<quic_cang@quicinc.com>, <mani@kernel.org>,
	<stanley.chu@mediatek.com>, <adrian.hunter@intel.com>,
	<beanhuo@micron.com>, <avri.altman@wdc.com>,
	<junwoo80.lee@samsung.com>, <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:TRACING" <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] scsi: ufs: core: Add trace event for MCQ
Date: Thu, 9 Mar 2023 10:44:17 +0800	[thread overview]
Message-ID: <f96b1867-142f-7fdc-8123-58fe3bdce844@quicinc.com> (raw)
In-Reply-To: <8a83ec79-be04-ec5c-f3ef-67f64dc55f12@acm.org>



On 3/7/2023 11:47 PM, Bart Van Assche wrote:
> On 3/6/23 21:53, Ziqi Chen wrote:
>> You are right,  users may hate it if the trace events for legacy mode 
>> and MCQ mode are different. But if I merge them into one event, it 
>> will print much invalid information as we can not add if-else into 
>> TP_printk().
>>
>> (For example:  in SDB legacy mode, you can see such invalid prints " 
>> hqid = 0 , sqt= 0, cqh=0, cqt = 0")
>>
>> Users may hate these invalid information.
>>
>> Anyway, I have made new version that merge 2 mode into one event, but 
>> are you sure we really need to use this way? if yes , I can push new 
>> version here.
>>
>> Or, could you give some suggestions if you have better way.
>>
>> Below is a piece of new version code , you can preview.
>>
>>      TP_fast_assign(
>>          __assign_str(dev_name, dev_name);
>>          __entry->str_t = str_t;
>>          __entry->tag = tag;
>>          __entry->doorbell = doorbell;
>>          __entry->hwq_id = hwq? hwq->id: 0;
>>          __entry->sq_tail = hwq? hwq->sq_tail_slot: 0;
>>          __entry->cq_head = hwq? hwq->cq_head_slot: 0;
>>          __entry->cq_tail = hwq? hwq->cq_tail_slot: 0;
>>          __entry->transfer_len = transfer_len;
>>          __entry->lba = lba;
>>          __entry->intr = intr;
>>          __entry->opcode = opcode;
>>          __entry->group_id = group_id;
>>      ),
>>
>>      TP_printk(
>>          "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, 
>> opcode: 0x%x (%s),"
>>          "group_id: 0x%x, hqid: %d, sqt: %d, cqh: %d, cqt: %d",
>>          show_ufs_cmd_trace_str(__entry->str_t), __get_str(dev_name), 
>> __entry->tag,
>>          __entry->doorbell, __entry->transfer_len, __entry->intr, 
>> __entry->lba,
>>          (u32)__entry->opcode, str_opcode(__entry->opcode), 
>> (u32)__entry->group_id,
>>          __entry->hwq_id,__entry->sq_tail, __entry->cq_head, 
>> __entry->cq_tail
>>      )
> 
> Hi Ziqi,
> 
> Please reply below the original e-mail instead of above. This is 
> expected on Linux kernel mailing lists.
> 
> Regarding your question: I propose to leave out the sq_tail, cq_head and 
> cq_tail information. That information may be useful for hardware 
> developers but is not useful for other users of the Linux kernel. So the 
> only piece of information that is left that is MCQ-specific is the 
> hardware queue index. I expect that users will be fine to see that 
> information in trace events.
> 
> How about reporting hardware queue index -1 for legacy mode instead of 
> 0? That will allow users to tell the difference between legacy mode and 
> MCQ mode from the trace events.
> 
> Thanks,
> 
> Bart.

Hi Bart,

Thanks for you suggestion. But the member hwq->id is an Unsigned 
integer. if you want to identify SDB mode and MCQ mode,  using "0" is 
enough, Or how about add string such as below?

ufshcd_command: MCQ: complete_rsp: 1d84000.ufshc: tag: 14, DB: 0x0, 
size: 32768, IS: 0, LBA: 5979448,opcode: 0x2a (WRITE_10),group_id: 0x0, 
hqid: 2

Ziqi
> 

  reply	other threads:[~2023-03-09  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  9:35 [PATCH v4] scsi: ufs: core: Add trace event for MCQ Ziqi Chen
2023-03-03 18:01 ` Bart Van Assche
     [not found]   ` <f80fd91b-3a03-5c38-72c0-cd5c3edb33b8@quicinc.com>
2023-03-07 15:47     ` Bart Van Assche
2023-03-09  2:44       ` Ziqi Chen [this message]
2023-03-09 15:45         ` Bart Van Assche
2023-03-10  4:19           ` Ziqi Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f96b1867-142f-7fdc-8123-58fe3bdce844@quicinc.com \
    --to=quic_ziqichen@quicinc.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=junwoo80.lee@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mhiramat@kernel.org \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox