[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB6575C38931D2BB4A560A355BFC2A9@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Thu, 20 Oct 2022 07:44:48 +0000
From: Avri Altman <Avri.Altman@....com>
To: Wenchao Chen <wenchao.chen666@...il.com>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>
CC: "axboe@...nel.dk" <axboe@...nel.dk>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"kch@...dia.com" <kch@...dia.com>,
"CLoehle@...erstone.com" <CLoehle@...erstone.com>,
"vincent.whitchurch@...s.com" <vincent.whitchurch@...s.com>,
"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
"s.shtylyov@....ru" <s.shtylyov@....ru>,
"michael@...winnertech.com" <michael@...winnertech.com>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"megoo.tang@...il.com" <megoo.tang@...il.com>,
"lzx.stg@...il.com" <lzx.stg@...il.com>
Subject: RE: [PATCH] mmc: block: Support Host to control FUA.
> According to the above data, disable FUA (fua_disable = 1) improves the
> performance. Therefore, it is recommended to support the host to control
> FUA.
>
> Signed-off-by: Wenchao Chen <wenchao.chen@...soc.com>
> ---
> drivers/mmc/core/block.c | 3 ++-
> include/linux/mmc/host.h | 3 +++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index
> 54cd009aee50..333e819e077a 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -2490,7 +2490,8 @@ static struct mmc_blk_data
> *mmc_blk_alloc_req(struct mmc_card *card,
> ((card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN) ||
> card->ext_csd.rel_sectors)) {
> md->flags |= MMC_BLK_REL_WR;
> - fua_enabled = true;
> + if (!card->host->fua_disable)
> + fua_enabled = true;
Where are you allowing to set fua_disable?
And then I would expect you to call blk_queue_flag_set to set QUEUE_FLAG_FUA.
Thanks,
Avri
> cache_enabled = true;
> }
> if (mmc_cache_enabled(card->host)) diff --git
> a/include/linux/mmc/host.h b/include/linux/mmc/host.h index
> 8fdd3cf971a3..16a5bee3eeae 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -517,6 +517,9 @@ struct mmc_host {
> struct blk_crypto_profile crypto_profile; #endif
>
> + /* Host FUA support */
> + bool fua_disable;
> +
> /* Host Software Queue support */
> bool hsq_enabled;
>
> --
> 2.17.1
Powered by blists - more mailing lists