[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d1768030-28fe-476b-9161-2b26f296c0dd@acm.org>
Date: Wed, 26 Jun 2024 09:33:33 -0700
From: Bart Van Assche <bvanassche@....org>
To: Ziqi Chen <quic_ziqichen@...cinc.com>,
Peter Wang (王信友) <peter.wang@...iatek.com>,
"quic_rampraka@...cinc.com" <quic_rampraka@...cinc.com>,
"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
"quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"avri.altman@....com" <avri.altman@....com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"junwoo80.lee@...sung.com" <junwoo80.lee@...sung.com>,
"mani@...nel.org" <mani@...nel.org>,
"quic_cang@...cinc.com" <quic_cang@...cinc.com>
Cc: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
"quic_mnaresh@...cinc.com" <quic_mnaresh@...cinc.com>,
"manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: ufs: core: quiesce request queues before check
pending cmds
On 6/26/24 6:18 AM, Ziqi Chen wrote:
> On 6/26/2024 12:13 AM, Bart Van Assche wrote:
>> ufshcd_wait_for_doorbell_clr() should be removed and
>> ufshcd_clock_scaling_prepare() should use blk_mq_freeze_*().
>> See also my patch "ufs: Simplify the clock scaling mechanism
>> implementation" from 5 years ago
>> (https://lore.kernel.org/linux-scsi/20191112173743.141503-5-bvanassche@acm.org/).
>
> The defect of blk_mq_freeze_*() is that it would bring in significant
> latency and performance regression. I don't think it is what many people
> want to see.
This can be solved by inserting a synchronize_srcu_expedited() call
between the blk_freeze_queue_start() and the
blk_mq_freeze_queue_wait_timeout() calls. With that call added, the
latency of the new code should be lower than that of the
io_schedule_timeout(msecs_to_jiffies(20)) call in the current code.
blk_mq_freeze_*() is only slow if the RCU grace period is not expedited.
Bart.
Powered by blists - more mailing lists