From: Matthias Kaehlcke <mka@chromium.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"MyungJoo Ham" <myungjoo.ham@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
"Artur Świgoń" <a.swigon@partner.samsung.com>,
"Jacky Bai" <ping.bai@nxp.com>, "Angus Ainslie" <angus@akkea.ca>,
linux-pm@vger.kernel.org, linux-imx@nxp.com
Subject: Re: [PATCH v2 2/2] PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY
Date: Thu, 21 Nov 2019 15:26:15 -0800 [thread overview]
Message-ID: <20191121232615.GL27773@google.com> (raw)
In-Reply-To: <7190da59fb8fbb12538d2b28b87e1ee420cbb705.1574116684.git.leonard.crestez@nxp.com>
Hi Leonard,
On Tue, Nov 19, 2019 at 12:56:43AM +0200, Leonard Crestez wrote:
> Support for adding per-device frequency limits was removed in commit
> 2aac8bdf7a0f ("PM: QoS: Drop frequency QoS types from device PM QoS")
> after cpufreq switched to use a new "freq_constraints" construct.
>
> Restore support for per-device freq limits but base this upon
> freq_constraints. This is primarily meant to be used by the devfreq
> subsystem.
>
> This removes the "static" marking on freq_qos_apply but does not export
> it for modules.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>
> ...
>
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index 9105f47f5195..5193915913fe 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -32,10 +32,12 @@ enum pm_qos_flags_status {
> #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
> #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE PM_QOS_LATENCY_ANY
> #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT PM_QOS_LATENCY_ANY
> #define PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS PM_QOS_LATENCY_ANY_NS
> #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0
> +#define PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE 0
> +#define PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE (-1)
The value of -1 is problematic, as reported on
https://patchwork.kernel.org/patch/11252413/#23017003.
dev_pm_qos_read_value(dev, DEV_PM_QOS_MAX_FREQUENCY) returns the smallest
value of all requests, which is PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE / -1
unless all requests have set an actual constraint.
I'd suggest to change the default max value to S32_MAX or similar.
prev parent reply other threads:[~2019-11-21 23:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 22:56 [PATCH v2 0/2] PM: QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY Leonard Crestez
2019-11-18 22:56 ` [PATCH v2 1/2] PM / QoS: Reorder pm_qos/freq_qos/dev_pm_qos structs Leonard Crestez
2019-11-18 22:56 ` [PATCH v2 2/2] PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY Leonard Crestez
2019-11-21 23:26 ` Matthias Kaehlcke [this message]
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=20191121232615.GL27773@google.com \
--to=mka@chromium.org \
--cc=a.swigon@partner.samsung.com \
--cc=angus@akkea.ca \
--cc=cw00.choi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=leonard.crestez@nxp.com \
--cc=linux-imx@nxp.com \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=ping.bai@nxp.com \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).