Skip to contentSkip to conversation

Using out of band messages to change min/max frequencies

DISCUSSION Mark Langsdorf 2 participants 5 messages Mar 14, 2012 – Mar 20, 2012

lore
Share & tools
lore
#0 lore raw

Does cpufreq currently support having an out-of-band agent change the available minimum/maximum frequency and then have the current frequency conform to the new values?

I experimented with a notifier routine (from an IPC context) that used cpufreq_get_policy() and cpufreq_update_policy(). I ran into two problems:
1) cpufreq_update_policy() would overwrite the changes I made to the minimum/maximum settings
2) the driver->target call would be called within the notifier context, and would explode when it called its own notifiers.

driver->bios_limit doesn't seem like the right answer, since it wouldn't be called if the current governor has a static policy (ie performance, powersave).

Is there some better way to approach this? Ideally, I'd like something like the ACPI _PPC concept, but looking over that code I'm not sure it actually limits the frequency correctly.

--Mark Langsdorf
Calxeda, Inc.

#3 lore raw
Quoted 6 lines · Mark Langsdorf
Quoted 5 lines · Antti P Miettinen
Quoted 1 line · Mark Langsdorf

Is there some better way to approach this?

PM QoS :-)

Quoted 7 lines
Quoted 2 lines

http://thread.gmane.org/gmane.linux.kernel.cpufreq/7794
http://thread.gmane.org/gmane.linux.kernel.cpufreq/7797

Thanks, that looks like it could be useful.

Is there a sample implementation of this in the context of a cpufreq device driver?

Hmm.. controlling cpufreq core from cpufreq driver? Nope, this input event booster is the only example I have:

http://thread.gmane.org/gmane.linux.kernel.cpufreq/7801

	--Antti
#4 lore raw
Quoted 12 lines · Antti P Miettinen
Quoted 11 lines · Mark Langsdorf
Quoted 7 lines · Antti P Miettinen
Quoted 1 line · Mark Langsdorf

Is there some better way to approach this?

PM QoS :-)

http://thread.gmane.org/gmane.linux.kernel.cpufreq/7794
http://thread.gmane.org/gmane.linux.kernel.cpufreq/7797

Thanks, that looks like it could be useful.

Quoted 7 lines
Quoted 2 lines

Is there a sample implementation of this in the context of a cpufreq device driver?

Hmm.. controlling cpufreq core from cpufreq driver? Nope, this input event booster is the only example I have:

http://thread.gmane.org/gmane.linux.kernel.cpufreq/7801

Thanks. It wasn't exactly applicable, but it gave enough hints that I got the QoS parts working for my driver.

--Mark Langsdorf
Calxeda, Inc.