Messages in this thread | | | From | "Rafael J. Wysocki" <> | Subject | Re: [PATCH V3 2/5] PM / QOS: Pass request type to dev_pm_qos_read_value() | Date | Tue, 18 Jun 2019 01:14:15 +0200 |
| |
On Monday, June 10, 2019 12:51:33 PM CEST Viresh Kumar wrote: > In order to use dev_pm_qos_read_value(), and other internal routines to > it, to read values for different QoS requests, pass request type as a > parameter to these routines. > > For now, it only supports resume-latency request type.
I don't quite like the structure by which the type arg is passed through the entire call chain until the switch in dep_pm_qos_raw_read_value().
There is only one direct user of dev_pm_qos_raw_read_value() AFAICS which is cpuidle. It shouldn't need to suffer the general case overhead, so I would rename that function to dev_pm_qos_raw_resume_latency() and update cpuidle accordingly.
Moreover, the callers of __dev_pm_qos_read_value() are interested in the resume latency value too, so it might make sense to rename this as __dev_pm_qos_resume_latency(), update its callers and put the switch into dev_pm_qos_read_value().
Plus the changelog should explain the broader rationale of this change like for the first patch IMO.
| |