Re: [PATCH v9] mmc: support BKOPS feature for eMMC

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

 



Hello Adrian,

On Thu, June 14, 2012 4:46 pm, Adrian Hunter wrote:
> On 08/06/12 07:39, Jaehoon Chung wrote:
>> Enable eMMC background operations (BKOPS) feature.
>>
>> If URGENT_BKOPS is set after a response, note that BKOPS
>> are required. After all I/O requests are finished, run
>> BKOPS if required. Should read/write operations be requested
>> during BKOPS, first issue HPI to interrupt the ongoing BKOPS
>> and then service the request.
>> If BKOPS-STATUS is upper than LEVEL2, need to check until clear
>> the BKOPS-STATUS vaule.
>>
>> If you want to enable this feature, set MMC_CAP2_BKOPS.
>> And if you want to set the BKOPS_EN bit in ext_csd register,
>> use the MMC_CAP2_INIT_BKOPS.
>>
>> Future considerations
>>  * Check BKOPS_LEVEL=1 and start BKOPS in a preventive manner.
>>  * Interrupt ongoing BKOPS before powering off the card.
>>  * How get BKOPS_STATUS value.(periodically send ext_csd command?)
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx>
>> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
>> Signed-off-by: Konstantin Dorfman <kdorfman@xxxxxxxxxxxxxx>
>> Signed-off-by: Maya Erez <merez@xxxxxxxxxxxxxx>
>> ---
>
> I would not expect this to work nicely with runtime PM.  I expect that
> BKOPS
> would need to be stopped beforehand.  But that would limit the time
> available for BKOPS since runtime PM would always kick in and stop it.
> How
> is runtime PM to be handled?
>
Indeed, it is handled in mmc_suspend_host(), HPI issued before CMD5, when
background BKOPS in progress.
We expect to start BKOPS when idle period starts (no block requests
incoming). Then we have 2 cases:
 1) URGENT level reached => BKOPS started synchronously and host will wait
    till no more BKOPS needed
 2) BKOPS level is not URGENT, there is host controller driver defined
    timeout after last host command, before runtime suspend flow triggerred.
    For example for msm_sdcc it is 5 second.

This implementation was tested and we did not see URGENT levels and
performance degradation.
-- 
Kostya Dorfman,
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux