From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mark Langsdorf <mark.langsdorf@calxeda.com>,
Zhang Rui <rui.zhang@intel.com>
Cc: "cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: support for software direct frequency throttling?
Date: Thu, 17 Oct 2013 22:28:13 +0200 [thread overview]
Message-ID: <1748637.gcTIfKF45Q@vostro.rjw.lan> (raw)
In-Reply-To: <526020CA.1080605@calxeda.com>
On Thursday, October 17, 2013 12:39:22 PM Mark Langsdorf wrote:
> On 08/07/2013 06:37 PM, Rafael J. Wysocki wrote:
> > On Wednesday, August 07, 2013 02:38:55 PM Mark Langsdorf wrote:
> >> Is there an easy way to dynamically limit the maximum or minimum
> >> frequencies available to a governor? I'm trying to support frequency
> >> throttling in response to a thermal event (or theoretically to allow a
> >> BMC to set a minimum frequency regardless of current load).
> >>
> >> I looked into doing this last year and it required some QoS patches that
> >> I don't think ever made it into the kernel.
> >>
> >> Is there a straightforward way to do this right now?
> >
> > Have you looked at drivers/thermal/cpu_cooling.c ?
>
> Yes, and I'm not sure how to use it get what I want.
>
> I have a mailbox interrupt on my system that will trigger with a message
> when the BMC monitoring the thermal sensor notices that the temperature
> passes a trip point; the message will include the new maximum frequency.
> I want to pass that new maximum frequency to the cpufreq governor so it
> can reassess the current frequency against the maximum and lower it if
> need be.
>
> I don't know in advance what the trip points or maximum frequencies are;
> the BMC managing the thermal sensor has that information but doesn't
> provide it to Linux.
>
> The most appealing solution would be to just copy
> cpufreq_apply_cooling() and cpufreq_thermal_modifier() from
> drivers/thermal/cpu_cooling.c in the highbank_cpufreq.c driver, as
> they're the core logic of what I need. I don't know if that would be
> acceptable, though. I've looked at setting up a full thermal_zone
> solution, and its more than I need without actually giving me a good way
> to set the frequencies when I need to.
I see.
Rui, any advice on that?
Rafael
prev parent reply other threads:[~2013-10-17 20:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5202A24F.6040506@calxeda.com>
[not found] ` <2466745.skqnolQonv@vostro.rjw.lan>
2013-10-17 17:39 ` support for software direct frequency throttling? Mark Langsdorf
2013-10-17 20:28 ` Rafael J. Wysocki [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=1748637.gcTIfKF45Q@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=cpufreq@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.langsdorf@calxeda.com \
--cc=rui.zhang@intel.com \
/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