Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Asutosh Das (asd)" <asutoshd@codeaurora.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org, Can Guo <cang@codeaurora.org>,
	Avri Altman <avri.altman@wdc.com>, Bean Huo <beanhuo@micron.com>,
	Alim Akhtar <alim.akhtar@samsung.com>
Subject: Re: [PATCH RFC] ufs: Make ufshcd_wait_for_register() sleep instead of busy-waiting
Date: Fri, 15 May 2020 12:28:39 -0700	[thread overview]
Message-ID: <16bb7e00-abbd-060c-c775-ae49a024d7de@acm.org> (raw)
In-Reply-To: <198a1467-09db-f846-e153-a9681ff15b71@codeaurora.org>

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@codeaurora.org>
>> Cc: Avri Altman <avri.altman@wdc.com>
>> Cc: Bean Huo <beanhuo@micron.com>
>> Cc: Alim Akhtar <alim.akhtar@samsung.com>
>> Cc: Asutosh Das <asutoshd@codeaurora.org>
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>
> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>

Thanks for the review Asutosh. Does anyone else want to review and/or test this patch?

Thanks,

Bart.

  reply	other threads:[~2020-05-15 19:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 22:27 [PATCH RFC] ufs: Make ufshcd_wait_for_register() sleep instead of busy-waiting Bart Van Assche
2020-05-08 16:27 ` Asutosh Das (asd)
2020-05-15 19:28   ` Bart Van Assche [this message]
2020-05-15 19:34     ` [EXT] " Bean Huo (beanhuo)
2020-05-16 13:23     ` Stanley Chu
2020-05-16 16:10     ` [EXT] " Bean Huo (beanhuo)
2020-05-20  2:30 ` 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=16bb7e00-abbd-060c-c775-ae49a024d7de@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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