From: Chanwoo Choi <cw00.choi@samsung•com>
To: Leonard Crestez <leonard.crestez@nxp•com>,
Matthias Kaehlcke <mka@chromium•org>
Cc: "Artur Świgoń" <a.swigon@partner•samsung.com>,
"Abel Vesa" <abel.vesa@nxp•com>,
"Saravana Kannan" <saravanak@google•com>,
"linux-pm@vger•kernel.org" <linux-pm@vger•kernel.org>,
"Viresh Kumar" <viresh.kumar@linaro•org>,
dl-linux-imx <linux-imx@nxp•com>,
"Krzysztof Kozlowski" <krzk@kernel•org>,
"Lukasz Luba" <l.luba@partner•samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung•com>,
"MyungJoo Ham" <myungjoo.ham@samsung•com>,
"Alexandre Bailon" <abailon@baylibre•com>,
"Georgi Djakov" <georgi.djakov@linaro•org>,
"linux-arm-kernel@lists•infradead.org"
<linux-arm-kernel@lists•infradead.org>,
"Jacky Bai" <ping.bai@nxp•com>
Subject: Re: [PATCH v8 5/6] PM / devfreq: Add PM QoS support
Date: Thu, 26 Sep 2019 10:08:02 +0900 [thread overview]
Message-ID: <48e271f5-58d3-845a-538f-6fb75eb3deb6@samsung.com> (raw)
In-Reply-To: <VI1PR04MB7023910B94E4920D329427C8EE870@VI1PR04MB7023.eurprd04.prod.outlook.com>
Hi,
On 19. 9. 26. 오전 4:40, Leonard Crestez wrote:
> On 25.09.2019 05:13, Chanwoo Choi wrote:
>> On 19. 9. 25. 오전 4:22, Leonard Crestez wrote:
>>> On 24.09.2019 22:11, Matthias Kaehlcke wrote:
>>>> On Tue, Sep 24, 2019 at 01:11:29PM +0300, Leonard Crestez wrote:
>>>>> Register notifiers with the PM QoS framework in order to respond to
>>>>> requests for DEV_PM_QOS_MIN_FREQUENCY and DEV_PM_QOS_MAX_FREQUENCY.
>>>>>
>>>>> No notifiers are added by this patch but PM QoS constraints can be
>>>>> imposed externally (for example from other devices).
>>>>>
>>>>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp•com>
>>>>> Reviewed-by: Matthias Kaehlcke <mka@chromium•org>
>>>>> ---
>>>>> drivers/devfreq/devfreq.c | 75 +++++++++++++++++++++++++++++++++++++++
>>>>> include/linux/devfreq.h | 5 +++
>>>>> 2 files changed, 80 insertions(+)
>>>>>
>>>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>>>> index eee403e70c84..784f3e40536a 100644
>>>>> --- a/drivers/devfreq/devfreq.c
>>>>> +++ b/drivers/devfreq/devfreq.c
>>>>> @@ -22,15 +22,18 @@
>>>>> #include <linux/platform_device.h>
>>>>> #include <linux/list.h>
>>>>> #include <linux/printk.h>
>>>>> #include <linux/hrtimer.h>
>>>>> #include <linux/of.h>
>>>>> +#include <linux/pm_qos.h>
>>>>> #include "governor.h"
>>>>>
>>>>> #define CREATE_TRACE_POINTS
>>>>> #include <trace/events/devfreq.h>
>>>>>
>>>>> +#define HZ_PER_KHZ 1000
>>>>> +
>>>>> static struct class *devfreq_class;
>>>>>
>>>>> /*
>>>>> * devfreq core provides delayed work based load monitoring helper
>>>>> * functions. Governors can use these or can implement their own
>>>>> @@ -109,10 +112,11 @@ static unsigned long find_available_max_freq(struct devfreq *devfreq)
>>>>> static void get_freq_range(struct devfreq *devfreq,
>>>>> unsigned long *min_freq,
>>>>> unsigned long *max_freq)
>>>>> {
>>>>> unsigned long *freq_table = devfreq->profile->freq_table;
>>>>> + unsigned long qos_min_freq, qos_max_freq;
>>>>>
>>>>> lockdep_assert_held(&devfreq->lock);
>>>>>
>>>>> /*
>>>>> * Init min/max frequency from freq table.
>>>>> @@ -125,10 +129,18 @@ static void get_freq_range(struct devfreq *devfreq,
>>>>> } else {
>>>>> *min_freq = freq_table[devfreq->profile->max_state - 1];
>>>>> *max_freq = freq_table[0];
>>>>> }
>>>>>
>>>>> + /* constraints from PM QoS */
>>>>> + qos_min_freq = dev_pm_qos_read_value(devfreq->dev.parent,
>>>>> + DEV_PM_QOS_MIN_FREQUENCY);
>>>>> + qos_max_freq = dev_pm_qos_read_value(devfreq->dev.parent,
>>>>> + DEV_PM_QOS_MIN_FREQUENCY); >
>>>> This needs to be DEV_PM_QOS_MAX_FREQUENCY. I missed this in the earlier
>>>> reviews, but stumbled across it when testing.
>>>>
>>>> !Reviewed-by: Matthias Kaehlcke <mka@chromium•org>
>>>
>>> I broke it in v8 while processing comments. Thanks for catching it.
>>
>> Did you test this patchset with v8?
>> Maybe it is not working with this mistake.
>
> I ran some scripts which test that min_freq requests work as expected
> (using imx interconnect+devfreq). They don't touch max_freq.
We always have to test the code before contributing the patch.
Please test all cases for these patches.
>
> --
> Regards,
> Leonard
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-26 1:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190924101140epcas1p4abeedf42f223e65f58c88a0ddf1e4e56@epcas1p4.samsung.com>
2019-09-24 10:11 ` [PATCH v8 0/6] PM / devfreq: Add dev_pm_qos support Leonard Crestez
2019-09-24 10:11 ` [PATCH v8 1/6] PM / devfreq: Don't fail devfreq_dev_release if not in list Leonard Crestez
2019-09-24 10:11 ` [PATCH v8 2/6] PM / devfreq: Move more initialization before registration Leonard Crestez
2019-09-25 1:46 ` Chanwoo Choi
2019-09-25 1:58 ` MyungJoo Ham
2019-09-25 19:33 ` Leonard Crestez
2019-09-24 10:11 ` [PATCH v8 3/6] PM / devfreq: Don't take lock in devfreq_add_device Leonard Crestez
2019-09-24 10:11 ` [PATCH v8 4/6] PM / devfreq: Introduce get_freq_range helper Leonard Crestez
2019-09-25 1:37 ` Chanwoo Choi
2019-09-25 20:55 ` Leonard Crestez
2019-09-26 1:06 ` Chanwoo Choi
2019-09-26 14:03 ` Leonard Crestez
2019-09-24 10:11 ` [PATCH v8 5/6] PM / devfreq: Add PM QoS support Leonard Crestez
2019-09-24 19:11 ` Matthias Kaehlcke
2019-09-24 19:22 ` Leonard Crestez
2019-09-25 2:17 ` Chanwoo Choi
2019-09-25 19:40 ` Leonard Crestez
2019-09-26 1:08 ` Chanwoo Choi [this message]
2019-09-25 2:15 ` Chanwoo Choi
2019-09-25 16:06 ` Matthias Kaehlcke
2019-09-25 21:18 ` Leonard Crestez
2019-09-26 1:12 ` Chanwoo Choi
2019-09-26 13:43 ` Leonard Crestez
2019-09-27 1:49 ` Chanwoo Choi
2019-09-30 13:16 ` Leonard Crestez
2019-09-30 21:42 ` Chanwoo Choi
2019-10-01 9:39 ` Leonard Crestez
2019-10-01 21:55 ` Chanwoo Choi
2019-09-26 1:19 ` Chanwoo Choi
2019-09-30 12:43 ` Leonard Crestez
2019-09-30 21:21 ` Chanwoo Choi
2019-09-24 10:11 ` [PATCH v8 6/6] PM / devfreq: Use PM QoS for sysfs min/max_freq Leonard Crestez
2019-09-25 2:41 ` Chanwoo Choi
2019-09-25 16:45 ` Matthias Kaehlcke
2019-09-26 1:25 ` Chanwoo Choi
2019-09-26 16:04 ` Matthias Kaehlcke
2019-09-27 1:58 ` Chanwoo Choi
2019-09-25 22:11 ` Leonard Crestez
2019-09-26 1:26 ` Chanwoo Choi
2019-09-25 1:44 ` [PATCH v8 0/6] PM / devfreq: Add dev_pm_qos support Chanwoo Choi
2019-09-25 19:37 ` Leonard Crestez
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=48e271f5-58d3-845a-538f-6fb75eb3deb6@samsung.com \
--to=cw00.choi@samsung$(echo .)com \
--cc=a.swigon@partner$(echo .)samsung.com \
--cc=abailon@baylibre$(echo .)com \
--cc=abel.vesa@nxp$(echo .)com \
--cc=georgi.djakov@linaro$(echo .)org \
--cc=krzk@kernel$(echo .)org \
--cc=kyungmin.park@samsung$(echo .)com \
--cc=l.luba@partner$(echo .)samsung.com \
--cc=leonard.crestez@nxp$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-imx@nxp$(echo .)com \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=mka@chromium$(echo .)org \
--cc=myungjoo.ham@samsung$(echo .)com \
--cc=ping.bai@nxp$(echo .)com \
--cc=saravanak@google$(echo .)com \
--cc=viresh.kumar@linaro$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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