From: Stanley Chu <stanley.chu@mediatek.com>
To: "Asutosh Das (asd)" <asutoshd@codeaurora.org>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
andy.teng@mediatek.com, jejb@linux.ibm.com,
chun-hung.wu@mediatek.com, kuohong.wang@mediatek.com,
linux-kernel@vger.kernel.org, avri.altman@wdc.com,
cang@codeaurora.org, linux-mediatek@lists.infradead.org,
peter.wang@mediatek.com, alim.akhtar@samsung.com,
matthias.bgg@gmail.com, bvanassche@acm.org,
linux-arm-kernel@lists.infradead.org, beanhuo@micron.com
Subject: Re: [PATCH v1 3/5] scsi: ufs: customize flush threshold for WriteBooster
Date: Sat, 9 May 2020 17:15:08 +0800 [thread overview]
Message-ID: <1589015708.3197.46.camel@mtkswgap22> (raw)
In-Reply-To: <4196ff98-093e-3708-d166-a7a7c6046c57@codeaurora.org>
Hi Asutosh,
Thanks for your review.
On Fri, 2020-05-08 at 11:12 -0700, Asutosh Das (asd) wrote:
> On 5/8/2020 10:15 AM, Stanley Chu wrote:
> > Allow flush threshold for WriteBooster to be customizable by
> > vendors. To achieve this, make the value as a variable in struct
> > ufs_hba first.
> >
> > Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> > ---
> > drivers/scsi/ufs/ufshcd.c | 6 ++++--
> > drivers/scsi/ufs/ufshcd.h | 1 +
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index cdacbe6378a1..9a0ce6550c2f 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -5301,8 +5301,8 @@ static bool ufshcd_wb_presrv_usrspc_keep_vcc_on(struct ufs_hba *hba,
> > cur_buf);
> > return false;
> > }
> > - /* Let it continue to flush when >60% full */
> > - if (avail_buf < UFS_WB_40_PERCENT_BUF_REMAIN)
> > + /* Let it continue to flush when available buffer exceeds threshold */
> > + if (avail_buf < hba->vps->wb_flush_threshold)
> > return true;
> >
> > return false;
> > @@ -6839,6 +6839,7 @@ static void ufshcd_wb_probe(struct ufs_hba *hba, u8 *desc_buf)
> > if (!d_lu_wb_buf_alloc)
> > goto wb_disabled;
> > }
> > +
> Is this newline needed?
Oops, I will remove this in next version.
>
> > return;
> >
> > wb_disabled:
> > @@ -7462,6 +7463,7 @@ static const struct attribute_group *ufshcd_driver_groups[] = {
> >
> > static struct ufs_hba_variant_params ufs_hba_vps = {
> > .hba_enable_delay_us = 1000,
> > + .wb_flush_threshold = UFS_WB_40_PERCENT_BUF_REMAIN,
> > .devfreq_profile.polling_ms = 100,
> > .devfreq_profile.target = ufshcd_devfreq_target,
> > .devfreq_profile.get_dev_status = ufshcd_devfreq_get_dev_status,
> > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> > index f7bdf52ba8b0..e3dfb48e669e 100644
> > --- a/drivers/scsi/ufs/ufshcd.h
> > +++ b/drivers/scsi/ufs/ufshcd.h
> > @@ -570,6 +570,7 @@ struct ufs_hba_variant_params {
> > struct devfreq_dev_profile devfreq_profile;
> > struct devfreq_simple_ondemand_data ondemand_data;
> > u16 hba_enable_delay_us;
> > + u32 wb_flush_threshold;
> > };
> >
> > /**
> >
>
> Patch[3] & [4] may be combined into a single patch perhaps?
> Patch[4] just redoes what [3] did in a different way, so might as well
> just do what patch[4] does right away.
OK! I will try to merge both to a single patch in next version.
Let me know if you have any other comments for the whole series.
Thanks,
Stanley Chu
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-09 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 17:15 [PATCH v1 0/5] scsi: ufs: allow customizable WriteBooster flush policy Stanley Chu
2020-05-08 17:15 ` [PATCH v1 1/5] scsi: ufs: introduce ufs_hba_variant_params to collect customizable parameters Stanley Chu
2020-05-08 17:15 ` [PATCH v1 2/5] scsi: ufs-mediatek: change the way to use " Stanley Chu
2020-05-08 17:15 ` [PATCH v1 3/5] scsi: ufs: customize flush threshold for WriteBooster Stanley Chu
2020-05-08 18:12 ` Asutosh Das (asd)
2020-05-09 9:15 ` Stanley Chu [this message]
2020-05-08 17:15 ` [PATCH v1 4/5] scsi: ufs: use flexible definition for UFS_WB_BUF_REMAIN_PERCENT Stanley Chu
2020-05-08 17:15 ` [PATCH v1 5/5] scsi: ufs-mediatek: customize WriteBooster flush policy Stanley Chu
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=1589015708.3197.46.camel@mtkswgap22 \
--to=stanley.chu@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=andy.teng@mediatek.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=chun-hung.wu@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=kuohong.wang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=peter.wang@mediatek.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