pm-utilsのpm-powersaveについて

PowerTOP

pm-utilsには省電力モードに移行させる「pm-powersave」というコマンドがある。
Manpageの解説によると「/etc/pm/power.d/」と「/usr/lib/pm-utils/power.d/」以下のスクリプトを順に実行するらしい。
pm-utilsの流儀では前者はユーザーが任意のシェルスクリプトを入れて「pm-powersave」の動作を「hook」する場所なので通常何も入っていない。一方後者は他のパッケージがシェルスクリプトを入れる場所であり、私の手元のFedora 9 では「sched-powersave」というスクリプトが一つだけ存在する。仲を覗くと、

#!/bin/sh

path_mc="/sys/devices/system/cpu/sched_mc_power_savings"
path_smp="/sys/devices/system/cpu/sched_smp_power_savings"
val=0

case "$1" in
	true)
		echo "**sched policy powersave ON"
		val=1
		;;
	false)
		echo "**sched policy powersave OFF"
		val=0
		;;
esac

# Based on the values (1-enable, 0-disable) for these controls,
# sched groups cpu power will be determined for different domains.
# When power savings policy is enabled and under light load conditions,
# scheduler will minimize the physical packages/cpu cores carrying the
# load and thus conserving power

if [ -w "$path_mc" ] ; then
	echo $val > $path_mc
fi
if [ -w "$path_smp" ] ; then
	echo $val > $path_smp
fi

exit 0

と書いてある。
つまりtrueを引数に与えると(もし存在すれば)「/sys/devices/system/cpu/sched_mc_power_savings」と「/sys/devices/system/cpu/sched_smp_power_savings」を1に、falseなら0にするものだ。
この二つのパラメータはkernel 2.6.18で導入されたもので、1にするとマルチコア(mc)もしくは同時マルチスレッディング(smt)環境で片方のコア(またはスレッド)に処理を集中させてもう片方を眠らせ省電力を実現する物らしい。(そのかわりパフォーマンスが落ちる可能性がある。)
参考:LWN.netLinux Kernel Newbies
手元のVOSTRO 1400(Core 2 Duo)では「/sys/devices/system/cpu/sched_mc_power_savings」のみ存在し、初期状態は0だった。「pm-powersave true」を実行し、PowerTOPで監視してみたが効果はまったく分からなかった。


パッケージのバージョン:

  • kernel-2.6.26.5-45.fc9.i686
  • powertop-1.9-3.fc9.i386
  • pm-utils-1.1.0-7.fc9.i386