From 8aae17379df8772e46b0f28fdb4d3e974f65ad54 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Sat, 28 Jun 2008 23:25:11 -0500 Subject: Added some explanatory comments to the power hooks. --- pm/power.d/laptop-mode | 3 +++ pm/power.d/readahead | 4 ++++ pm/power.d/xfs_buffer | 2 ++ 3 files changed, 9 insertions(+) diff --git a/pm/power.d/laptop-mode b/pm/power.d/laptop-mode index 0e35f67..52a8452 100644 --- a/pm/power.d/laptop-mode +++ b/pm/power.d/laptop-mode @@ -5,6 +5,7 @@ VM="/proc/sys/vm" [ -f $VM/laptop_mode -a -f $VM/dirty_ratio ] || exit $NA laptop_mode_ac() { + # disable laptop mode, set vm parameters back to sane defaults echo 0 >$VM/laptop_mode echo 5 >$VM/dirty_background_ratio echo 2999 >$VM/dirty_expire_centisecs @@ -13,6 +14,8 @@ laptop_mode_ac() { } laptop_mode_battery() { + # enable laptop mode, set vm parameters to buffer as many writes as + # possible. echo 1 >$VM/laptop_mode echo 1 >$VM/dirty_background_ratio echo 60000 >$VM/dirty_expire_centisecs diff --git a/pm/power.d/readahead b/pm/power.d/readahead index 4247217..c61ce43 100644 --- a/pm/power.d/readahead +++ b/pm/power.d/readahead @@ -3,6 +3,10 @@ [ -x /sbin/blockdev ] || exit $NA readahead() { + # the intent here is to iterate through all filesystems + # mounted on a local block device. It Works For The Maintainer(tm). + # More sophistication in figuring out what exactly is a local block device + # would be welcome. for dev in $(awk '/^\/dev\// {print $1}'$XFS/age_buffer_centisecs echo 3000 >$XFS/xfssyncd_centisecs echo 100 >$XFS/xfsbufd_centisecs } xfs_battery() { + # buffer lots echo 60000 >$XFS/age_buffer_centisecs echo 60000 >$XFS/xfssyncd_centisecs echo 3000 >$XFS/xfsbufd_centisecs -- cgit v1.2.3