From: Bean Huo <huobean@gmail.com>
To: j-young.choi@samsung.com, ALIM AKHTAR <alim.akhtar@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"beanhuo@micron.com" <beanhuo@micron.com>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 4/7] scsi: ufs: wb: Add explicit flush sysfs attribute
Date: Wed, 27 Jul 2022 19:43:02 +0200 [thread overview]
Message-ID: <1f8e95da0c92f92937b5455a45430c939539d524.camel@gmail.com> (raw)
In-Reply-To: <20220727070841epcms2p5e212d617dd0f985555fa052f099013f0@epcms2p5>
On Wed, 2022-07-27 at 16:08 +0900, Jinyoung CHOI wrote:
> There is the following quirk to bypass "WB Flush" in Write Booster.
>
> - UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL
>
> If this quirk is not set, there is no knob that can control "WB
> Flush".
>
> There are three flags that control Write Booster Feature.
> 1. WB ON/OFF
> 2. WB Hibern Flush ON/OFF (implicitly)
> 3. WB Flush ON/OFF (explicit)
>
> The sysfs attribute that controls the WB was implemented. (1)
>
> In the case of "Hibern Flush", it is always good to turn on.
> Control may not be required. (2)
>
> Finally, "Flush" may be necessary because the Auto-Hibern8 is not
> supported in a specific environment.
> So the sysfs attribute that controls this is necessary. (3)
>
> Reviewed-by: Avri Altman <avri.altman@wdc.com>
> Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
> ---
...
>
> +static ssize_t wb_buf_flush_en_store(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
> + struct ufs_hba *hba = dev_get_drvdata(dev);
> + unsigned int wb_buf_flush_en;
> + ssize_t res;
> +
> + if (ufshcd_is_wb_allowed(hba) &&
> + !(hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL)) {
> + dev_warn(dev, "It is not allowed to configure WB buf
> flush!\n");
> + return -EOPNOTSUPP;
> + }
> +
Hi J-young,
I don't understand here, if UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL is
not set (manual flush is not disable), so we cannot manually flush
buffer? or should we check if Auto-Hibern8 is supported?
Kind regards,
Bean
next prev parent reply other threads:[~2022-07-27 18:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p6>
2022-07-27 6:59 ` [PATCH v4 0/7] scsi: ufs: wb: Add sysfs attribute and cleanup Jinyoung CHOI
[not found] ` <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p5>
2022-07-27 7:04 ` [PATCH v4 1/7] scsi: ufs: wb: Move ufshcd_is_wb_allowed() to callee Jinyoung CHOI
2022-07-27 13:16 ` Bean Huo
2022-07-27 7:05 ` [PATCH v4 2/7] scsi: ufs: wb: Change wb_enabled condition test Jinyoung CHOI
2022-07-27 13:49 ` Bean Huo
2022-07-27 7:08 ` [PATCH v4 4/7] scsi: ufs: wb: Add explicit flush sysfs attribute Jinyoung CHOI
2022-07-27 17:43 ` Bean Huo [this message]
[not found] ` <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p3>
2022-07-28 0:54 ` Jinyoung CHOI
[not found] ` <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p7>
2022-07-27 7:10 ` [PATCH v4 5/7] scsi: ufs: wb: Add ufshcd_is_wb_buf_flush_allowed() Jinyoung CHOI
2022-07-27 17:50 ` Bean Huo
2022-07-27 19:44 ` Bart Van Assche
2022-07-28 1:18 ` Jinyoung CHOI
[not found] ` <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p4>
2022-07-27 7:11 ` [PATCH v4 6/7] scsi: ufs: wb: Modify messages Jinyoung CHOI
2022-07-27 7:12 ` [PATCH v4 7/7] scsi: ufs: wb: Move the comment to the right position Jinyoung CHOI
[not found] ` <CGME20220727065904epcms2p60a7a56101785ddefa55c82b3cc25116d@epcms2p8>
2022-07-27 7:07 ` [PATCH v4 3/7] scsi: ufs: wb: Change functions name and modify Jinyoung CHOI
2022-07-28 6:21 ` RE:(2) [PATCH v4 1/7] scsi: ufs: wb: Move ufshcd_is_wb_allowed() to callee Jinyoung CHOI
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=1f8e95da0c92f92937b5455a45430c939539d524.camel@gmail.com \
--to=huobean@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=j-young.choi@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®