public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Do not flush cache when it is disabled
@ 2021-03-22 13:36 Avri Altman
  2021-03-22 13:36 ` [PATCH 1/2] mmc: block: Issue flush only if allowed Avri Altman
  2021-03-22 13:36 ` [PATCH 2/2] mmc: block: Update ext_csd.cache_ctrl if it was written Avri Altman
  0 siblings, 2 replies; 6+ messages in thread
From: Avri Altman @ 2021-03-22 13:36 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc; +Cc: Adrian Hunter, linux-kernel, Avri Altman

Cache is a temporary storage space in an eMMC device. Volatile by
nature, the cache should in typical case reduce the access time compared
to an access to the main nonvolatile storage.

The cache function can be turned ON and OFF. Once OFF, the host is not
expected to issue a flush-cache command to the device.


Avri Altman (2):
  mmc: block: Issue flush only if allowed
  mmc: block: Update ext_csd.cache_ctrl if it was written

 drivers/mmc/core/block.c   | 11 +++++++++++
 drivers/mmc/core/mmc_ops.c |  4 +---
 drivers/mmc/core/mmc_ops.h |  5 +++++
 3 files changed, 17 insertions(+), 3 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mmc: block: Update ext_csd.cache_ctrl if it was written
@ 2021-04-02  7:59 Avri Altman
  0 siblings, 0 replies; 6+ messages in thread
From: Avri Altman @ 2021-04-02  7:59 UTC (permalink / raw)
  To: adrian.hunter@intel.com
  Cc: Avri Altman, linux-kernel@vger.kernel.org,
	linux-mmc@vger.kernel.org, ulf.hansson@linaro.org

>> @@ -571,6 +571,14 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
>>  		main_md->part_curr = value & EXT_CSD_PART_CONFIG_ACC_MASK;
>>  	}
>>  
>> +	/* Make sure to update CACHE_CTRL in case it was changed */

> It might be worth noting that the cache will get turned back
> on if the card is re-initialized, for example suspend/resume or
> hw reset in recovery.
Done.

Thanks,
Avri

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-02  7:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22 13:36 [PATCH 0/2] Do not flush cache when it is disabled Avri Altman
2021-03-22 13:36 ` [PATCH 1/2] mmc: block: Issue flush only if allowed Avri Altman
2021-03-22 18:00   ` Adrian Hunter
2021-03-22 13:36 ` [PATCH 2/2] mmc: block: Update ext_csd.cache_ctrl if it was written Avri Altman
2021-03-22 18:59   ` Adrian Hunter
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02  7:59 Avri Altman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox