lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f8e95da0c92f92937b5455a45430c939539d524.camel@gmail.com>
Date:   Wed, 27 Jul 2022 19:43:02 +0200
From:   Bean Huo <huobean@...il.com>
To:     j-young.choi@...sung.com, ALIM AKHTAR <alim.akhtar@...sung.com>,
        "avri.altman@....com" <avri.altman@....com>,
        "bvanassche@....org" <bvanassche@....org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 4/7] scsi: ufs: wb: Add explicit flush sysfs attribute

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@....com>
> Signed-off-by: Jinyoung Choi <j-young.choi@...sung.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ