From: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>
Cc: "tanghuan@vivo.com" <tanghuan@vivo.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"ebiggers@kernel.org" <ebiggers@kernel.org>,
"quic_mnaresh@quicinc.com" <quic_mnaresh@quicinc.com>,
"ziqi.chen@oss.qualcomm.com" <ziqi.chen@oss.qualcomm.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"quic_narepall@quicinc.com" <quic_narepall@quicinc.com>,
"nitin.rawat@oss.qualcomm.com" <nitin.rawat@oss.qualcomm.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"huobean@gmail.com" <huobean@gmail.com>,
"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
"liu.song13@zte.com.cn" <liu.song13@zte.com.cn>,
"can.guo@oss.qualcomm.com" <can.guo@oss.qualcomm.com>,
zhongqiu.han@oss.qualcomm.com
Subject: Re: [PATCH v3] scsi: ufs: core: Fix data race in CPU latency PM QoS request handling
Date: Thu, 18 Sep 2025 11:51:12 +0800 [thread overview]
Message-ID: <9f2cba57-1d4a-4541-b127-5d207e4353c9@oss.qualcomm.com> (raw)
In-Reply-To: <c28785e6db14f383cecea3e2b047adf0e928c4cd.camel@mediatek.com>
On 9/18/2025 11:16 AM, Peter Wang (王信友) wrote:
> On Wed, 2025-09-17 at 17:41 +0800, Zhongqiu Han wrote:
>>
>> ufshcd_init_clk_gating(hba);
>> diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
>> index ea0021f067c9..277dda606f4d 100644
>> --- a/include/ufs/ufshcd.h
>> +++ b/include/ufs/ufshcd.h
>> @@ -938,6 +938,7 @@ enum ufshcd_mcq_opr {
>> * @ufs_rtc_update_work: A work for UFS RTC periodic update
>> * @pm_qos_req: PM QoS request handle
>> * @pm_qos_enabled: flag to check if pm qos is enabled
>> + * @pm_qos_mutex: synchronizes PM QoS request and status updates
>> * @critical_health_count: count of critical health exceptions
>> * @dev_lvl_exception_count: count of device level exceptions since
>> last reset
>> * @dev_lvl_exception_id: vendor specific information about the
>> @@ -1110,6 +1111,8 @@ struct ufs_hba {
>> struct delayed_work ufs_rtc_update_work;
>> struct pm_qos_request pm_qos_req;
>> bool pm_qos_enabled;
>> + /* synchronizes PM QoS request and status updates */
>>
>
> Hi Zhongqiu,
>
> I think this line can be removed to make the code cleaner,
> since you’ve already explained the purpose of each parameter above.
>
> Thanks.
> Peter
>
>
>
>> + struct mutex pm_qos_mutex;
>>
>> int critical_health_count;
>> atomic_t dev_lvl_exception_count;
>> --
>> 2.43.0
>>
>
Hi Peter,
Thanks a lot for your review~
---
In Patch V1, we got below info from checkpatch.pl strict mode:
include/ufs/ufshcd.h:1140: CHECK:UNCOMMENTED_DEFINITION: struct mutex
definition without comment
+ struct mutex pm_qos_mutex;
So since V2, the comment was added. I want to strictly follow the
community coding style guidelines. Thank you~
>
>
>
> ************* MEDIATEK Confidentiality Notice
> ********************
> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be
> conveyed only to the designated recipient(s). Any use, dissemination,
> distribution, printing, retaining or copying of this e-mail (including its
> attachments) by unintended recipient(s) is strictly prohibited and may
> be unlawful. If you are not an intended recipient of this e-mail, or believe
>
> that you have received this e-mail in error, please notify the sender
> immediately (by replying to this e-mail), delete any and all copies of
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!
>
--
Thx and BRs,
Zhongqiu Han
next prev parent reply other threads:[~2025-09-18 3:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 9:41 Zhongqiu Han
2025-09-17 16:33 ` Bart Van Assche
2025-09-18 3:16 ` Peter Wang (王信友)
2025-09-18 3:51 ` Zhongqiu Han [this message]
2025-09-18 3:53 ` Huan Tang
2025-09-25 1:59 ` Martin K. Petersen
2025-09-30 2:36 ` Martin K. Petersen
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=9f2cba57-1d4a-4541-b127-5d207e4353c9@oss.qualcomm.com \
--to=zhongqiu.han@oss.qualcomm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=ebiggers@kernel.org \
--cc=huobean@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=liu.song13@zte.com.cn \
--cc=martin.petersen@oracle.com \
--cc=neil.armstrong@linaro.org \
--cc=nitin.rawat@oss.qualcomm.com \
--cc=peter.wang@mediatek.com \
--cc=quic_mnaresh@quicinc.com \
--cc=quic_narepall@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=tanghuan@vivo.com \
--cc=viro@zeniv.linux.org.uk \
--cc=ziqi.chen@oss.qualcomm.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
all inboxes | Powered by JetHome®