Re: [PATCH RFC] ufs: Make ufshcd_wait_for_register() sleep instead of busy-waiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,

On Fri, 2020-05-15 at 12:28 -0700, Bart Van Assche wrote:
> On 2020-05-08 09:27, Asutosh Das (asd) wrote:
> > On 5/7/2020 3:27 PM, Bart Van Assche wrote:
> >> The ufshcd_wait_for_register() function either sleeps or spins until the
> >> specified register has reached the desired value. Busy-waiting is not
> >> only considered a bad practice but also has a bad impact on energy
> >> consumption. Always sleep instead of spinning by making sure that all
> >> ufshcd_wait_for_register() calls happen from a context where it is
> >> allowed to sleep. The only function call that has to be moved is the
> >> ufshcd_hba_stop() call in ufshcd_host_reset_and_restore().
> >>
> >> Cc: Can Guo <cang@xxxxxxxxxxxxxx>
> >> Cc: Avri Altman <avri.altman@xxxxxxx>
> >> Cc: Bean Huo <beanhuo@xxxxxxxxxx>
> >> Cc: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
> >> Cc: Asutosh Das <asutoshd@xxxxxxxxxxxxxx>
> >> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

Reviewed-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux