From: Sujit Reddy Thumma <sthumma@codeaurora.org>
To: Seungwon Jeon <tgih.jun@samsung.com>
Cc: 'Vinayak Holikatti' <vinholikatti@gmail.com>,
'Santosh Y' <santoshsy@gmail.com>,
"'James E.J. Bottomley'" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations
Date: Fri, 19 Jul 2013 23:56:22 +0530 [thread overview]
Message-ID: <51E984CE.3010207@codeaurora.org> (raw)
In-Reply-To: <001e01ce8487$c246e300$46d4a900$%jun@samsung.com>
>>>>>>> I'm not sure that BKOPS with runtime-pm associates.
>>>>>>> Do you think it's helpful for power management?
>>>>>>> How about hibernation scheme for runtime-pm?
>>>>>>> I'm testing and I can introduce soon.
>>>>>
>>>>> Well, I am thinking on following approach when we introduce
>>>>> power management.
>>>>>
>>>>> ufshcd_runtime_suspend() {
>>>>> if (bkops_status >= NON_CRITICAL) { /* 0x1 */
>>>>> ufshcd_enable_auto_bkops();
>>>>> hibernate(); /* only the link and the device
>>>>> should be able to cary out bkops */
>>>>> } else {
>>>>> hibernate(); /* Link and the device for more savings */
>>>>> }
>>>>> }
>>>>>
>>>>> Let me know if this is okay.
>>> I still consider whether BKOPS is proper behavior with runtime-pm or not.
>>
>> The BKOPS is something that host allows the card to carry out
>> when the host knows it is idle and not expecting back to back requests.
>> Runtime PM idle is the only way to know whether the device is
>> idle (unless we want to reinvent the wheel to detect the idleness of
>> host and trigger bkops). There was a discussion on this in MMC mailing
>> list as well, and folks have agreed to move idle time bkops to runtime
>> PM (http://thread.gmane.org/gmane.linux.kernel.mmc/19444/)
> It looks like different.
> eMMC cannot execute BKOPS itself unlike UFS.
> That's the way eMMC's host should trigger the BKOPS manually.
>
I guess it is not much of a difference for UFS as far as we concern
only about idle time bkops. In UFS one can still disallow the device to
not carry out BKOPS and hence the case where UFS device also cannot
execute BKOPS itself and a idle timer is needed to allow BKOPS
sporadically so that device doesn't go into URGENT_BKOPS state.
>>
>>> How about this scenario? It seems more simple.
> > > If we concern a response latency of transfer requests, BKOPS can be disabled by default.
>>> And then BKOPS can be enabled whenever device requests in some exception.
>>> If you have any idea, let me know.
>>
>> Exceptions are raised only when the device is in critical need for
>> bkops. Also the spec. recommends, host should ensure that the device
>> doesn't go into such states.
>>
>> With your suggestion, when we disable bkops, the exception is raised and
>> we enable bkops after which there is no way to disable it again?
> Yes, it's difficult to find proper time.
> Maybe, BKOPS can be disabled when request comes up.
>
In cases where there are back-to-back heavy data write requests then it
is not proper to enable/disable BKOPS as soon as the new request comes
up. It may happen that the card will then move from PERFORMANCE_IMPACT
state to CRITICAL and ultimately start failing the requests. The point
is that we should never get into state where we need URGENT_BKOPS.
--
Regards,
Sujit
next prev parent reply other threads:[~2013-07-19 18:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 9:15 [PATCH V3 0/2] scsi: ufs: Add support to control UFS device background operations Sujit Reddy Thumma
2013-07-09 9:15 ` [PATCH V3 1/2] scsi: ufs: Add support for host assisted " Sujit Reddy Thumma
2013-07-09 10:41 ` merez
2013-07-10 13:31 ` Seungwon Jeon
2013-07-11 9:57 ` Sujit Reddy Thumma
2013-07-17 8:13 ` Seungwon Jeon
2013-07-18 3:48 ` Sujit Reddy Thumma
2013-07-19 13:56 ` Seungwon Jeon
2013-07-19 18:26 ` Sujit Reddy Thumma [this message]
2013-07-09 9:15 ` [PATCH V3 2/2] scsi: ufs: Add runtime PM support for UFS host controller driver Sujit Reddy Thumma
2013-07-09 10:41 ` merez
2013-07-10 13:31 ` Seungwon Jeon
2013-07-11 10:27 ` Sujit Reddy Thumma
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=51E984CE.3010207@codeaurora.org \
--to=sthumma@codeaurora.org \
--cc=JBottomley@parallels.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=santoshsy@gmail.com \
--cc=tgih.jun@samsung.com \
--cc=vinholikatti@gmail.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;
as well as URLs for NNTP newsgroup(s).