[Comm] Cpufreq и Transmeta Crusoe (was: Обо всем понемногу или Веб-камера Motion Eye (Sony Vaio Picturebook) в ALT Linux)

Владимир Гусев vova1971 на narod.ru
Ср Сен 30 19:17:20 UTC 2009


On Wed, 30 Sep 2009 21:43:21 +0400
Владимир Гусев wrote:

> > > policy        Can be  any  of  the  available  governor's  name
> > > as  shown
> > > in /sys/devices/.../cpufreq/scaling_available_governors, this
> > > means that if you compiled governors as modules in  your kernel,
> > > you need to load them before running cpufreqd. [REQUIRED]
> > > 
> > > :-( Там у меня только perfomance и powersave, никакого ondemand
> > 
> > modprobe cpufreq_ondemand
> 
> Вон оно как.. 
> 
> Сейчас попробую - если все будет удачно, то наверное надо в загрузку
> (/etc/modules).
> 
> На всякий случай пересобрал cpufreqd сотоварищи из p5 для
> Бранча 4.1. Пусть будет.

Сделал загрузку cpufreq_ondemand, сделал нижнюю границу частоты 300
мгц. Перегрузил - все равно не видит cpufreq-info этот регулятор:

[root на vaio ~]# cpufreq-info 
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux на brodo.de, please.
analyzing CPU 0:
  driver: longrun
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 3.0 MHz - 595 MHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 119 MHz and 476 MHz.
                  The governor "performance" may decide which speed to
use within this range.
  current CPU frequency is 500 MHz (asserted by call to hardware).

Хотя по сравнению с предыдущим выводом этой команды вижу, что диапазон
не 300-595 мгц, а меньше. И нынешняя частота не 595, а 500 мгц. Однако
регулятор - perfomance. 

cpufreq_ondemand сразу включился в работу, судя по lsmod:

[root на vaio ~]# lsmod
Module                  Size  Used by
mach64                 48384  1 
drm                    84648  2 mach64
binfmt_misc            16008  1 
af_packet              26624  2 
dm_mod                 66408  0 
sg                     40500  0 
as_iosched             18820  1 
usb_storage            76736  0 
libusual               23336  1 usb_storage
ndiswrapper           195356  0 
pcmcia                 43948  0 
firmware_class         13312  1 pcmcia
snd_ymfpci             65728  2 
gameport               18828  1 snd_ymfpci
snd_ac97_codec        104868  1 snd_ymfpci
ac97_bus                5888  1 snd_ac97_codec
snd_pcm_oss            45728  0 
snd_seq_dummy           7684  0 
snd_seq_oss            36352  0 
serio_raw              11012  0 
snd_seq_midi_event     11520  1 snd_seq_oss
psmouse                51476  0 
evdev                  16256  5 
snd_seq                56432  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_mixer_oss          20480  1 snd_pcm_oss
pcspkr                  7168  0 
button                 12176  0 
fan                     9604  0 
rtc                    18984  0 
battery                17156  0 
ac                      9988  0 
snd_pcm                81028  4 snd_ymfpci,snd_ac97_codec,snd_pcm_oss
snd_opl3_lib           15744  1 snd_ymfpci
snd_timer              27656  4 snd_ymfpci,snd_seq,snd_pcm,snd_opl3_lib
snd_hwdep              13316  1 snd_opl3_lib
snd_page_alloc         14088  2 snd_ymfpci,snd_pcm
snd_mpu401_uart        12672  1 snd_ymfpci
snd_rawmidi            28576  1 snd_mpu401_uart
snd_seq_device         12172  5 snd_seq_dummy,snd_seq_oss,snd_seq,snd_opl3_lib,snd_rawmidi
thermal                23068  0 
snd                    61348  16 snd_ymfpci,snd_ac97_codec,snd_pcm_oss,snd_seq_oss,snd_seq,snd_mixer_oss,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device
yenta_socket           30476  2 
meye                   34312  0 
processor              44008  2 thermal
rsrc_nonstatic         17536  1 yenta_socket
soundcore              11872  1 snd
videodev               38912  1 meye
v4l1_compat            18948  1 videodev
pcmcia_core            43924  3 pcmcia,yenta_socket,rsrc_nonstatic
uhci_hcd               29072  0 
ohci1394               36912  0 
sony_laptop            39132  2 meye
ieee1394               95416  1 ohci1394
i2c_piix4              13196  0 
efficeon_agp           12320  0 
agpgart                38344  2 drm,efficeon_agp
i2c_core               28820  1 i2c_piix4
usbcore               150896  5 usb_storage,libusual,ndiswrapper,uhci_hcd
cpufreq_ondemand       12684  0 
freq_table              8832  1 cpufreq_ondemand
longrun                 6920  0 
ext3                  140040  2 
jbd                    51220  1 ext3
mbcache                12676  1 ext3
ata_generic            13444  0 
pata_acpi              11520  0 
ata_piix               26244  0 
libata                165264  3 ata_generic,pata_acpi,ata_piix
dock                   14352  1 libata
sd_mod                 33816  0 
scsi_mod              154924  4 sg,usb_storage,libata,sd_mod
ide_generic             5248  0 [permanent]
ide_pci_generic         8196  0 [permanent]
ide_disk               19584  4 
piix                   11400  0 [permanent]
ide_core              120608  4
ide_generic,ide_pci_generic,ide_disk,piix

В самом /etc/cpufreqd.conf

[root на vaio etc]# cat cpufreqd.conf
# this is a comment
# see CPUFREQD.CONF(5) manpage for a complete reference

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
#enable_remote=1
#remote_group=root
[/General]

#[acpi]
#acpid_socket=/var/run/acpid.socket
#[/acpi]

#[nforce2_atxp1]
#vcore_path=/some/path
#vcore_default=1500
#[/nforce2_atxp1]

#[sensors_plugin]
#sensors_conf=/some/file
#[/sensors_plugin]

[Profile]
name=On Demand High
minfreq=40%
maxfreq=100%
policy=ondemand
exec_pre=cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[/Profile]

[Profile]
name=On Demand Low
minfreq=20%
maxfreq=80%
policy=ondemand
[/Profile]

[Profile]
name=Performance High
minfreq=100%
maxfreq=100%
policy=performance
exec_pre=cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
exec_post=echo 8 > /proc/acpi/sony/brightness
[/Profile]

[Profile]
name=Performance Low
minfreq=80%
maxfreq=80%
policy=performance
[/Profile]

[Profile]
name=Powersave High
minfreq=70%
maxfreq=70%
policy=powersave
[/Profile]

[Profile]
name=Powersave Low
minfreq=30%
maxfreq=30%
policy=powersave
[/Profile]

#[Profile]
#name=Conservative High
#minfreq=33%
#maxfreq=100%
#policy=conservative
#[/Profile]
#
#[Profile]
#name=Conservative Low
#minfreq=0%
#maxfreq=66%
#policy=conservative
#[/Profile]

##
# Basic states
##
# when AC use performance mode
[Rule]
name=AC Rule
ac=on                    # (on/off)
profile=Performance High
[/Rule]
 
# conservative mode when not AC
[Rule]
name=AC Off - Low Battery
ac=off                   # (on/off)
battery_interval=0-30
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=Powersave Low
[/Rule]

# conservative mode when not AC
[Rule]
name=AC Off - Medium Battery
ac=off                   # (on/off)
battery_interval=30-70
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=On Demand Low
[/Rule]

# stay in performance mode for the first minutes
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=70-100
#exec_post=echo 5 > /proc/acpi/sony/brightness
profile=On Demand High
[/Rule]

##
# Special Rules
##
# CPU Too hot!
[Rule]
name=CPU Too Hot
acpi_temperature=55-100
cpu_interval=50-100
profile=Performance Low
[/Rule]

# use performance mode if I'm watching a movie
# I don't care for batteries! 
# But don't heat too much.
[Rule]
name=Movie Watcher
programs=xine,mplayer,avidemux,gcc,totem,vlc,kaffeine,ogle,lindvd
battery_interval=0-100
acpi_temperature=0-60
cpu_interval=0-100
profile=Performance High
[/Rule]

Исходя из вывода cpufreq-info (частоты 119 и 476 мгц) применяется профиль On Demand Low (20-80%). Но в списках он не значится, и его роль выполняет perfomance (?). И по какому принципу выбирается из cpufreqd.conf тот или иной профиль? Команду cpufreq-set -g ondemand делал - формально - ничего нет, на деле - вроде работает. Наверное нужно закомментарить все профили кроме одного. Мне бы подошел On Demand High..


-- 
С уважением,
Владимир Гусев


Подробная информация о списке рассылки community