All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanley Chu <chu.stanley@gmail.com>
To: Bean Huo <huobean@gmail.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
	peter.wang@mediatek.com, Stanley Chu <stanley.chu@mediatek.com>,
	linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Avri Altman <avri.altman@wdc.com>,
	ALIM AKHTAR <alim.akhtar@samsung.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	wsd_upstream@mediatek.com, linux-mediatek@lists.infradead.org,
	Chun-Hung Wu <chun-hung.wu@mediatek.com>,
	alice.chao@mediatek.com, cc.chou@mediatek.com,
	chaotian.jing@mediatek.com, jiajie.hao@mediatek.com,
	powen.kao@mediatek.com, qilin.tan@mediatek.com,
	lin.gui@mediatek.com
Subject: Re: [PATCH v1 0/2] ufs: allow vendor disable wb toggle in clock scaling
Date: Mon, 1 Aug 2022 10:11:21 +0800	[thread overview]
Message-ID: <CAGaU9a9nYnATi2QvMYp8M0K=iu7tAMNu1PDJ-SN1vACtY5aSCQ@mail.gmail.com> (raw)
In-Reply-To: <e2fba3fe9b10d060a9906c440dd1f55e52404d77.camel@gmail.com>

Hi,

On Fri, Jul 29, 2022 at 5:27 AM Bean Huo <huobean@gmail.com> wrote:
>
> On Thu, 2022-07-28 at 14:09 -0700, Bart Van Assche wrote:
> > On 7/28/22 00:16, peter.wang@mediatek.com wrote:
> > > Mediatek ufs do not want to toggle write booster when clock
> > > scaling.
> > > This patch set allow vendor disable wb toggle in clock scaling.
> >
> > I don't like this approach. Whether or not to toggle the write
> > booster
> > when scaling the clock is not dependent on the host controller and
> > hence
> > should not depend on the host controller driver.
> >
> > Has it been considered to add a sysfs attribute in the UFS driver
> > core
> > to control this behavior?
> >
>
> Bart,
> we already have wb_on sysfs node, but it only allows to write this node
> when clock scaling is not supported.
>
>
> static ssize_t wb_on_store(..)
> {
>         struct ufs_hba *hba = dev_get_drvdata(dev);
>         unsigned int wb_enable;
>         ssize_t res;
>
>         if (ufshcd_is_clkscaling_supported(hba)) {
>                 /*
>                  * If the platform supports
> UFSHCD_CAP_AUTO_BKOPS_SUSPEND,
>                  * turn WB on/off will be done while clock scaling
> up/down.
>                  */
>                 dev_warn(dev, "To control WB through wb_on is not
> allowed!\n");
>                 return -EOPNOTSUPP;
>         }
>
>
> Kind regards,
> Bean
>
> > Thanks,
> >
> > Bart.

Acked to this patch series.

Clk-Scaling is aimed to save power by fine-tuning any possible
resources depending on the workload.

Currently below items would be tuned,
1. Clk rate
2. Gear
3. Write Booster switch on/off

The truth is that each host (and device) vendor has different designs
to reduce the power, therefore those tunings may not be suitable or
need different ways for all host platforms.

Take below cases for example,

1. The clk cannot be set at different rates directly because it is
shared with other users.

2. The Write Booster feature does not need to be disabled because this
impacts the performance too much. Performance may be even worse than
the case when clk-scaling is disabled. In addition, system power may
be not reduced if a long data write period is harmful to the system
low-power design.

Thanks,
Stanley

  reply	other threads:[~2022-08-01  2:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28  7:16 [PATCH v1 0/2] ufs: allow vendor disable wb toggle in clock scaling peter.wang
2022-07-28  7:16 ` [PATCH v1 1/2] ufs: core: interduce a choice of " peter.wang
2022-07-28 21:41   ` Bean Huo
2022-08-01 14:31     ` Peter Wang
2022-07-28  7:16 ` [PATCH v1 2/2] ufs: host: support wb toggle with " peter.wang
2022-07-28 21:57   ` Bean Huo
2022-08-01 14:32     ` Peter Wang
2022-07-28 20:43 ` [PATCH v1 0/2] ufs: allow vendor disable wb toggle in " Avri Altman
2022-08-01 14:28   ` Peter Wang
2022-07-28 21:09 ` Bart Van Assche
2022-07-28 21:26   ` Bean Huo
2022-08-01  2:11     ` Stanley Chu [this message]
2022-08-01 14:30   ` Peter Wang
2022-08-01 16:43     ` Bart Van Assche
2022-08-01 17:58       ` Asutosh Das (asd)
2022-08-01 17:57 ` Christoph Hellwig
2022-08-01 18:12   ` Bart Van Assche
2022-08-01 18:14     ` Christoph Hellwig
2022-08-02  3:25       ` Peter Wang

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='CAGaU9a9nYnATi2QvMYp8M0K=iu7tAMNu1PDJ-SN1vACtY5aSCQ@mail.gmail.com' \
    --to=chu.stanley@gmail.com \
    --cc=alice.chao@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cc.chou@mediatek.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=chun-hung.wu@mediatek.com \
    --cc=huobean@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=jiajie.hao@mediatek.com \
    --cc=lin.gui@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=powen.kao@mediatek.com \
    --cc=qilin.tan@mediatek.com \
    --cc=stanley.chu@mediatek.com \
    --cc=wsd_upstream@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.