From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steve Muckle <steve.muckle@linaro.org>
Cc: Juri Lelli <Juri.Lelli@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: race condition on min/max update?
Date: Fri, 26 Feb 2016 08:23:15 +0530 [thread overview]
Message-ID: <20160226025315.GA9159@vireshk-i7> (raw)
In-Reply-To: <56CE1432.2020409@linaro.org>
+Rafael and linux-pm list
On 24-02-16, 12:36, Steve Muckle wrote:
> Hi Viresh,
>
> A while back you mentioned that it is not required to hold policy->rwsem
> when calling __cpufreq_driver_target. This simplified things for us a
> bit in schedfreq.
>
> But if policy->rwsem is not held, how does the frequency transition
> process protect itself against policy->min or policy->max changing?
> Don't you have a race there where it'd be possible to end up with the
> frequency being set to a rate lower than min or higher than max?
>
> I've taken a cursory look through the code and don't see what would
> prevent this from happening.
It seems that we were not being consistent with this stuff and might have
ignored this race altogether. On some cases we do update the frequency with
policy->rwsem and in others we don't.
It requires a closer look and cleanup I believe.
--
viresh
next parent reply other threads:[~2016-02-26 2:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56CE1432.2020409@linaro.org>
2016-02-26 2:53 ` Viresh Kumar [this message]
2016-02-26 14:11 ` race condition on min/max update? Rafael J. Wysocki
2016-02-26 14:37 ` Viresh Kumar
2016-02-26 21:05 ` Rafael J. Wysocki
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=20160226025315.GA9159@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=Juri.Lelli@arm.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=steve.muckle@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