You are not logged in.

#1 2012-05-30 19:09:02

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

[SOLVED] Cpupower vs manually settings the values

Hey all,

I'm looking into the powerdown scripts to adapt them to my own setup and I noticed it sets the CPU governor manually, the following way:

for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do opt $i powersave; done

So, it does not use any "framework" like cpupower or cpufreq-utils. Now I wonder, what benefits does using a framework (like cpupower in my case) offer, over manually setting it? I don't change governors often on the fly (only using these powerdown/powerup scripts) and I noticed I can also set the sched_smt setting manually. Thus, I could also put these lines in rc.local to have the same functionality:

for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do opt $i ondemand; done
opt /sys/devices/system/cpu/sched_smt_power_savings 1

Would that fully replace cpupower, or at least the way I use cpupower? What other advantages does using cpupower offer?

EDIT: Of course, I know those lines won't work outside their functions that are used in powerdown - but I can adjust these lines so they will work wink

Last edited by Unia (2012-05-31 17:14:29)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2012-05-31 15:18:02

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Cpupower vs manually settings the values

Oke, I'll simplify the question:

would using the manual approach get the same result as using cpupower and setting the governor that way?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2012-05-31 16:31:50

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Cpupower vs manually settings the values

Yes! smile

Offline

#4 2012-05-31 16:34:56

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Cpupower vs manually settings the values

Oh hey, you helped me again big_smile I'll change some settings then and report back


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5 2012-05-31 17:07:57

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Cpupower vs manually settings the values

All set 'n done. Just one last question: is there some better place to put this, other then in /etc/rc.local?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#6 2012-05-31 17:12:52

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Cpupower vs manually settings the values

No, i don't think. Or you can create a script for pm-utils, but it doesn't change much.
Happy i can help! smile

Offline

#7 2012-05-31 17:14:20

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Cpupower vs manually settings the values

Consider this solved, then! Thanks! smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB