Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Stanley Chu <stanley.chu@mediatek.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Asutosh Das (asd)" <asutoshd@codeaurora.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	<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: Sat, 16 May 2020 21:23:52 +0800	[thread overview]
Message-ID: <1589635432.3197.115.camel@mtkswgap22> (raw)
In-Reply-To: <16bb7e00-abbd-060c-c775-ae49a024d7de@acm.org>

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@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: Stanley Chu <stanley.chu@mediatek.com>


  parent reply	other threads:[~2020-05-16 13:23 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
2020-05-15 19:34     ` [EXT] " Bean Huo (beanhuo)
2020-05-16 13:23     ` Stanley Chu [this message]
2020-05-16 16:10     ` 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=1589635432.3197.115.camel@mtkswgap22 \
    --to=stanley.chu@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --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