All of lore.kernel.org
 help / color / mirror / Atom feed
* librte_power w/ intel_pstate cpufreq governor
@ 2017-02-27  5:56 Threqn Peng
  2017-03-01  9:22 ` Threqn Peng
  0 siblings, 1 reply; 15+ messages in thread
From: Threqn Peng @ 2017-02-27  5:56 UTC (permalink / raw)
  To: dev

Hey guys,

    I have the same problem which have been discussed in January
2016(*http://dpdk.org/ml/archives/dev/2016-January/031374.html
<http://dpdk.org/ml/archives/dev/2016-January/031374.html>*), about intel
cpu scaling frequency control in linux user space. But it seems no more
progress/solution relate to this problem until now.

    I also checked the example code:"L3 Forwarding with Power Management
Sample Application" in newest dpdk version (17.02) , no update yet.

    Is it true that, newer cpufreq driver p-state only support two
control-mode: "performance" and "powersave", and we can't do any more about
cpu working frequency control, for power-saving?

    Thanks for your help.

Best Regards,
Peng

^ permalink raw reply	[flat|nested] 15+ messages in thread
* librte_power w/ intel_pstate cpufreq governor
@ 2018-03-02  7:18 longtb5
  2018-03-02  7:20 ` longtb5
  0 siblings, 1 reply; 15+ messages in thread
From: longtb5 @ 2018-03-02  7:18 UTC (permalink / raw)
  To: dev; +Cc: david.hunt, mhall, helin.zhang, longtb5

Hi everybody,

I know this thread was from over 2 years ago but I ran into the same problem
with l3fwd-power today.
Any updates on this?

-BL

^ permalink raw reply	[flat|nested] 15+ messages in thread
* librte_power w/ intel_pstate cpufreq governor
@ 2015-12-06  0:08 Matthew Hall
  2016-01-03  7:51 ` Matthew Hall
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Hall @ 2015-12-06  0:08 UTC (permalink / raw)
  To: dev

Hello all,

I wanted to ask some questions about librte_power and the great adaptive 
polling / IRQ mode example in l3fwd-power.

I am very interested in getting this to work in my project because it will 
make it much friendlier to attract new community developers if I am as 
cooperative as possible with system resources.

Let's discuss the init process for a moment. It has some problems on my 
system, and I need some help to figure out how to handle this right.

1. Begins with the call to rte_power_init.

2. Attempts to init ACPI cpufreq mode.

2.1. Sets lcore cpufreq governor to userspace mode.

2.2. Function power_get_available_freqs checks lcore CPU frequencies from:

/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies

2.3. This fails with (cryptic) error "POWER: ERR: File not openned". I am 
planning to write a patch for this error a bit later.

My kernel is using the intel_pstate driver, so scaling_available_frequencies 
does not exist:

http://askubuntu.com/questions/544266/why-are-missing-the-frequency-options-on-cpufreq-utils-indicator

3. When power_get_available_freqs fails, rte_power_acpi_cpufreq_init fails.

4. rte_power_init will try rte_power_kvm_vm_init. That will fail because it's 
a physical Skylake system not some kind of VM.

5. Now rte_power_init totally fails, with error "POWER: ERR: Unable to set 
Power Management Environment for lcore 0".

So, I have a couple of questions to figure out from here:

1. It seems bad to switch the governor into userspace before verifying the 
frequencies available in scaling_available_frequencies. If there are no 
frequencies available, it seems like it should not be trying to take over 
control of an effectively uncontrollable value.

2. If the governor is switched to userspace, and then no governing is done, it 
seems like the clockrate will necessarily always be wrong also because nothing 
will be configuring it anymore, neither kernel, nor failed DPDK userspace 
code, since rte_power_freq_up / down function pointers will always be NULL. Is 
this true? This seems bad if so.

It seems that the librte_power code is basically out of date, as pstate has 
been present since Sandy Bridge, which is quite old by now for network 
processing. I am not sure how to make this work right now. So far I see a 
couple options but I really don't know much about this stuff:

1) skip rte_power_init completely, and let intel_pstate handle it using HWP 
mode

2) disable intel_pstate, switch to the legacy ACPI cpufreq (but people warned 
this old driver is mostly a no-op and the CPU ignores its frequency requests).

The Internet advice says it's possible, but not a very good idea, to switch 
from the modern intel_pstate driver to the legacy ACPI mode. Reading through 
the kernel docs (below) state that it's better to use HWP (Hardware P State) 
mode:

https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt

If none of this rte_power_init stuff works, are the other CPU conservation 
measures inside the l3fwd-power example enough to work right with HWP all by 
themselves with nothing additional?

Thanks,
Matthew.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-03-05 12:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27  5:56 librte_power w/ intel_pstate cpufreq governor Threqn Peng
2017-03-01  9:22 ` Threqn Peng
  -- strict thread matches above, loose matches on Subject: below --
2018-03-02  7:18 longtb5
2018-03-02  7:20 ` longtb5
2018-03-05 10:16   ` Hunt, David
2018-03-05 10:48     ` longtb5
2018-03-05 11:25       ` Hunt, David
2018-03-05 12:23         ` longtb5
2015-12-06  0:08 Matthew Hall
2016-01-03  7:51 ` Matthew Hall
2016-01-12 15:17   ` Zhang, Helin
2016-01-14  7:03     ` Matthew Hall
2016-01-14  7:11       ` Matthew Hall
2016-01-14  7:15       ` Zhang, Helin
2016-01-14  7:44         ` Matthew Hall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.