[PATCH V2 1/3] ufs: core: Add CPU latency QoS support for ufs driver

Manivannan Sadhasivam mani at kernel.org
Thu Dec 7 03:21:01 PST 2023


On Thu, Dec 07, 2023 at 03:56:43PM +0530, Nitin Rawat wrote:
> 
> 
> On 12/7/2023 3:13 PM, Manivannan Sadhasivam wrote:
> > On Wed, Dec 06, 2023 at 03:02:04PM -1000, Bart Van Assche wrote:
> > > On 12/6/23 05:32, Manivannan Sadhasivam wrote:
> > > > On Wed, Dec 06, 2023 at 07:32:54PM +0530, Naresh Maramaina wrote:
> > > > > On 12/5/2023 10:41 PM, Bart Van Assche wrote:
> > > > > > On 12/4/23 21:58, Naresh Maramaina wrote:
> > > > > > > On 12/5/2023 12:30 AM, Bart Van Assche wrote:
> > > > > > > > On 12/4/23 06:30, Maramaina Naresh wrote:
> > > > > > > > > +    /* This capability allows the host controller driver to
> > > > > > > > > use the PM QoS
> > > > > > > > > +     * feature.
> > > > > > > > > +     */
> > > > > > > > > +    UFSHCD_CAP_PM_QOS                = 1 << 13,
> > > > > > > > >     };
> > > > > > > > 
> > > > > > > > Why does it depend on the host driver whether or not PM QoS is
> > > > > > > > enabled? Why isn't it enabled unconditionally?
> > > > > > > 
> > > > > > > For some platform vendors power KPI might be more important than
> > > > > > > random io KPI. Hence this flag is disabled by default and can be
> > > > > > > enabled based on platform requirement.
> > > > > > 
> > > > > > How about leaving this flag out unless if a host vendor asks explicitly
> > > > > > for this flag?
> > > > > 
> > > > > IMHO, instead of completely removing this flag, how about having
> > > > > flag like "UFSHCD_CAP_DISABLE_PM_QOS" which will make PMQOS enable
> > > > > by default and if some host vendor wants to disable it explicitly,
> > > > > they can enable that flag.
> > > > > Please let me know your opinion.
> > > 
> > > That would result in a flag that is tested but that is never set by
> > > upstream code. I'm not sure that's acceptable.
> > > 
> > 
> > Agree. The flag shouldn't be introduced if there are no users.
> > 
> > > > If a vendor wants to disable this feature, then the driver has to be modified.
> > > > That won't be very convenient. So either this has to be configured through sysfs
> > > > or Kconfig if flexibility matters.
> > > 
> > > Kconfig sounds worse to me because changing any Kconfig flag requires a
> > > modification of the Android GKI kernel.
> > > 
> > 
> > Hmm, ok. Then I think we can have a sysfs hook to toggle the enable switch.
> 
> Hi Bart, Mani
> 
> How about keeping this feature enabled by default and having a module
> parameter to disable pmqos feature if required ?
> 

Module params not encouraged these days unless there are no other feasible
options available.

- Mani

> Regards,
> Nitin
> 
> > 
> > - Mani
> > 
> > > Thanks,
> > > 
> > > Bart.
> > 
> 

-- 
மணிவண்ணன் சதாசிவம்



More information about the Linux-mediatek mailing list