From: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
To: Bart Van Assche <bvanassche@acm.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "James E . J . Bottomley" <jejb@linux.ibm.com>,
Bean Huo <huobean@gmail.com>, Avri Altman <avri.altman@wdc.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Can Guo <cang@codeaurora.org>,
Daejun Park <daejun7.park@samsung.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Luca Porzio <lporzio@micron.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC] scsi: ufs-core: Do not use clk_scaling_lock in ufshcd_queuecommand()
Date: Thu, 4 Nov 2021 07:23:47 -0700 [thread overview]
Message-ID: <4895a54b-6d49-9204-e7b2-336854c83ed4@codeaurora.org> (raw)
In-Reply-To: <1a6fef86-9917-ddad-1845-d0406150ecb8@acm.org>
On 11/3/2021 10:06 AM, Bart Van Assche wrote:
> On 11/3/21 12:46 AM, Adrian Hunter wrote:
>> On 02/11/2021 22:49, Bart Van Assche wrote:
>>> static int ufshcd_clock_scaling_prepare(struct ufs_hba *hba)
>>> {
>>> - #define DOORBELL_CLR_TOUT_US (1000 * 1000) /* 1 sec */
>>> int ret = 0;
>>> +
>>> /*
>>> - * make sure that there are no outstanding requests when
>>> - * clock scaling is in progress
>>> + * Make sure that there are no outstanding requests while clock
>>> scaling
>>> + * is in progress. Since the error handler may submit TMFs,
>>> limit the
>>> + * time during which to block hba->tmf_queue in order not to
>>> block the
>>> + * UFS error handler.
>>> + *
>>> + * Since ufshcd_exec_dev_cmd() and
>>> ufshcd_issue_devman_upiu_cmd() lock
>>> + * the clk_scaling_lock before calling blk_get_request(), lock
>>> + * clk_scaling_lock before freezing the request queues to prevent a
>>> + * deadlock.
>>> */
>>> - ufshcd_scsi_block_requests(hba);
>>
>> How are requests from LUN queues blocked?
>
> I will add blk_freeze_queue() calls for the LUNs.
>
> Thanks,
>
> Bart.
Hi Bart,
In the current clock scaling code, the expectation is to scale up as
soon as possible.
For e.g. say, the current gear is G1 and there're pending requests in
the queue but the DBR is empty and there's a decision to scale up.
During scale-up, if the queues are frozen, wouldn't those requests be
issued to the driver and executed in G1 instead of G4?
I think this would lead to higher run to run variance in performance.
What do you think?
Thanks,
-asd
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project
next prev parent reply other threads:[~2021-11-04 14:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 13:37 [PATCH RFC] scsi: ufs-core: Do not use clk_scaling_lock in ufshcd_queuecommand() Adrian Hunter
2021-10-29 16:31 ` Bart Van Assche
2021-11-01 9:16 ` Adrian Hunter
2021-11-01 18:35 ` Bart Van Assche
2021-11-02 6:11 ` Adrian Hunter
2021-11-02 20:49 ` Bart Van Assche
2021-11-03 7:46 ` Adrian Hunter
2021-11-03 17:06 ` Bart Van Assche
2021-11-04 14:23 ` Asutosh Das (asd) [this message]
2021-11-04 17:10 ` Bart Van Assche
2021-11-08 18:06 ` Asutosh Das (asd)
2021-11-08 18:24 ` Bart Van Assche
2021-11-03 16:29 ` Asutosh Das (asd)
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=4895a54b-6d49-9204-e7b2-336854c83ed4@codeaurora.org \
--to=asutoshd@codeaurora.org \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=daejun7.park@samsung.com \
--cc=huobean@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=lporzio@micron.com \
--cc=martin.petersen@oracle.com \
--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