From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: "Wangtao (Kevin, Kirin)" <kevin.wangtao@hisilicon.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
gengyanping@hisilicon.com, sunzhaosheng@hisilicon.com
Subject: Re: [PATCH] cpufreq: reinitialize new policy min/max when writing scaling_(max|min)_freq
Date: Tue, 29 May 2018 10:47:55 +0200 [thread overview]
Message-ID: <2309223.3p98OPSZcO@aspire.rjw.lan> (raw)
In-Reply-To: <c6d1e102-bfdb-572c-2045-bf669ee9d674@hisilicon.com>
On Saturday, May 26, 2018 8:50:46 AM CEST Wangtao (Kevin, Kirin) wrote:
>
> 在 2018/5/24 15:45, Rafael J. Wysocki 写道:
> > On Thu, May 24, 2018 at 8:43 AM, Kevin Wangtao
> > <kevin.wangtao@hisilicon.com> wrote:
> >> consider such situation, current user_policy.min is 1000000,
> >> current user_policy.max is 1200000, in cpufreq_set_policy,
> >> other driver may update policy.min to 1200000, policy.max to
> >> 1300000. After that, If we input "echo 1300000 > scaling_min_freq",
> >> then user_policy.min will be 1300000, and user_policy.max is
> >> still 1200000, because the input value is checked with policy.max
> >> not user_policy.max. if we get all related cpus offline and
> >> online again, it will cause cpufreq_init_policy fail because
> >> user_policy.min is higher than user_policy.max.
> >
> > How do you reproduce this, exactly?
>
> I can also reproduce this issue with upstream code, write max frequency to scaling_max_freq
> and scaling_min_freq, run benchmark to let cpu cooling take effect to clip freq, then write
> the cliped freq to scaling_max_freq, thus user_policy.min is still max frequency but user_policy.max
> is cliped freq which is lower than max frequency.
OK, this is a bit more convincing.
It looks like bad interaction between cpufreq_update_policy() and updates of
the limits via sysfs.
next prev parent reply other threads:[~2018-05-29 8:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 6:43 Kevin Wangtao
2018-05-24 7:45 ` Rafael J. Wysocki
2018-05-25 2:54 ` Wangtao (Kevin, Kirin)
2018-05-29 8:45 ` Rafael J. Wysocki
2018-05-26 6:50 ` Wangtao (Kevin, Kirin)
2018-05-29 8:47 ` Rafael J. Wysocki [this message]
2018-05-26 7:16 ` [PATCH V2] " Kevin Wangtao
2018-05-29 10:26 ` Viresh Kumar
2018-05-30 8:03 ` Wangtao (Kevin, Kirin)
2018-05-30 7:56 ` [PATCH V3] " Kevin Wangtao
2018-05-30 11:10 ` Rafael J. Wysocki
2018-05-27 6:15 ` [PATCH] " kbuild test robot
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=2309223.3p98OPSZcO@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=gengyanping@hisilicon.com \
--cc=kevin.wangtao@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sunzhaosheng@hisilicon.com \
--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
all inboxes | Powered by JetHome®