LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-21-2009, 03:20 AM   #1
Olaus
Member
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126

Rep: Reputation: 17
Default cpufreq governor not according to kernel config?!


According to the kernel configuration:
Code:
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
Nevertheless, ondemand is the governor that is used according to the .../cpu/cpu0/cpufreq entry in /sys when the system is up and running.
Why is that?
(The kernel that I am running right now is 2.6.30.7)
 
Old 09-21-2009, 05:27 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Unless I'm mistaken, that kernel config entry means that the default governor in use will be determined by userspace application(s), rather than actually specifying which governor will necessarily be in use.

You should be able to set which governor is being used at any given time, by using the sysctl interface. Something like below:

shell# echo "performance" > ...<path/to>/cpu/cpu0/cpufreq/scaling_governor

..which you can do in a boot/init script, OR by using the sysctl.conf file (check around a bit for the exact syntax required for use in the sysctl.conf file for this item.

Hope this helps
Sasha
 
Old 09-21-2009, 05:56 AM   #3
Olaus
Member
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by GrapefruiTgirl View Post
Unless I'm mistaken, that kernel config entry means that the default governor in use will be determined by userspace application(s), rather than actually specifying which governor will necessarily be in use.

You should be able to set which governor is being used at any given time, by using the sysctl interface. Something like below:

shell# echo "performance" > ...<path/to>/cpu/cpu0/cpufreq/scaling_governor

..which you can do in a boot/init script, OR by using the sysctl.conf file (check around a bit for the exact syntax required for use in the sysctl.conf file for this item.

Hope this helps
Sasha
Sure, I did the echoing myself in an earlier installation in rc.local, but since I haven't done that this time, I wondered where the system does that. It is always nice to keep track on "hidden" configurations that the system does without I begging for it.
 
Old 09-21-2009, 08:50 AM   #4
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by GrapefruiTgirl View Post
Unless I'm mistaken, that kernel config entry means that the default governor in use will be determined by userspace application(s), rather than actually specifying which governor will necessarily be in use.
Yes, and he don't need to mess with kernel config as Slack comes correctly configured. He only need to load the modules.

Ondemand seems the safe initial choice. Most time it is just sitting on the slow speed or going full speed when demanded, but processor without multiple clocks work correctly.
 
Old 09-21-2009, 09:19 AM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Why is that?
Check /etc/rc.d/rc.modules. That is where the CPU frequency governor is modified during booting. Look at the end of the script.
 
Old 09-22-2009, 02:14 AM   #6
Olaus
Member
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Woodsman View Post
Check /etc/rc.d/rc.modules. That is where the CPU frequency governor is modified during booting. Look at the end of the script.
Thank you. It seems like the script tries to load every possible driver for frequency scaling regardless if they are included or not in the kernel, maybe I should comment some of them to save some boot time?
 
Old 09-22-2009, 11:04 AM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
maybe I should comment some of them to save some boot time?
Yes, as you see fit.

Prior to 13.0, the governor modules were listed in rc.modules but not loaded. The end-user had to uncomment the governor of choice. I prefered that approach. Before 13.0 I loaded the ondemand governor in rc.local.

In 13.0 I commented out all the options in rc.modules and still use my script snippet in rc.local. The simple reason being I run a snippet of code in rc.local to create /etc/issue, and part of the final text in /etc/issue includes the normal rated CPU speed. Loading the ondemand governor in rc.modules caused the resulting /etc/issue to always display the governed (lowest) speed rather than the normal rated speed. Purely cosmetic, but I'm the one who sees the incorrect text every day.
 
Old 09-23-2009, 02:08 AM   #8
Olaus
Member
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Woodsman View Post
...Purely cosmetic, but I'm the one who sees the incorrect text every day.
You are like me, don't want to see unnecessary (but harmless) messages at start up or in the logs :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpufreq governor problems on Thinkpad T21 dive Linux - Kernel 2 07-11-2008 04:25 PM
default scaling governor iiv Slackware 15 09-07-2007 03:32 AM
anyone know how to setup 'ondemand' governor with cpufreq ? -=Graz=- Ubuntu 3 05-15-2006 06:21 PM
Default kernel config pioter Slackware 3 11-19-2003 07:49 PM
default kernel config bLaX Linux - Newbie 6 11-06-2002 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration