From: Bart Van Assche <bvanassche@acm.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Vineeth Pillai (Google)" <vineeth@bitbyteword.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v3 08/11] scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites
Date: Fri, 15 May 2026 12:21:46 -0700 [thread overview]
Message-ID: <ebdc020e-419d-458a-9211-36f22af0c1d9@acm.org> (raw)
In-Reply-To: <20260515145048.1c021bc9@gandalf.local.home>
On 5/15/26 11:50 AM, Steven Rostedt wrote:
> On Fri, 15 May 2026 08:27:27 -0700
> Bart Van Assche <bvanassche@acm.org> wrote:
>
>> On 5/15/26 6:59 AM, Vineeth Pillai (Google) wrote:
>>> static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
>>> @@ -432,8 +432,8 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
>>> if (!trace_ufshcd_upiu_enabled())
>>> return;
>>>
>>> - trace_ufshcd_upiu(hba, str_t, &rq_rsp->header,
>>> - &rq_rsp->qr, UFS_TSF_OSF);
>>> + trace_call__ufshcd_upiu(hba, str_t, &rq_rsp->header,
>>> + &rq_rsp->qr, UFS_TSF_OSF);
>>> }
>>
>> Instead of making this change, please remove the
>> trace_ufshcd_upiu_enabled() call because it is redundant.
>
> You mean to remove the ufshcd_add_query_upiu_trace() function and just use
> a tracepoint where it is called?
That would be even better.
>>> static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
>>> @@ -445,15 +445,15 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
>>> return;
>>>
>>> if (str_t == UFS_TM_SEND)
>>> - trace_ufshcd_upiu(hba, str_t,
>>> - &descp->upiu_req.req_header,
>>> - &descp->upiu_req.input_param1,
>>> - UFS_TSF_TM_INPUT);
>>> + trace_call__ufshcd_upiu(hba, str_t,
>>> + &descp->upiu_req.req_header,
>>> + &descp->upiu_req.input_param1,
>>> + UFS_TSF_TM_INPUT);
>>> else
>>> - trace_ufshcd_upiu(hba, str_t,
>>> - &descp->upiu_rsp.rsp_header,
>>> - &descp->upiu_rsp.output_param1,
>>> - UFS_TSF_TM_OUTPUT);
>>> + trace_call__ufshcd_upiu(hba, str_t,
>>> + &descp->upiu_rsp.rsp_header,
>>> + &descp->upiu_rsp.output_param1,
>>> + UFS_TSF_TM_OUTPUT);
>>> }
>>
>> Same comment here: I think it would be better to remove the
>> trace_ufshcd_upiu_enabled() call rather than
>> changing trace_ufshcd_upiu() into trace_call__ufshcd_upiu().
>
> Well, removing it here would mean placing the if (str == UFS_TM_SEND) into
> the code and processing it even when tracing is disabled. With the
> trace_*_enabled() helper, it's all a nop.
The ufshcd_add_tm_upiu_trace() function is only called from the UFS
error handler and hence is not performance sensitive. The execution of
an additional if-test in this function is not a concern at all.
Thanks,
Bart.
prev parent reply other threads:[~2026-05-15 19:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 13:59 [PATCH v3 08/11] scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites Vineeth Pillai (Google)
2026-05-15 15:27 ` Bart Van Assche
2026-05-15 18:50 ` Steven Rostedt
2026-05-15 19:21 ` Bart Van Assche [this message]
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=ebdc020e-419d-458a-9211-36f22af0c1d9@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vineeth@bitbyteword.org \
/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