aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-14 20:25:39 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-14 20:25:39 -0700
commita581734327bffe26ceda1ecf9916785d31688e31 (patch)
tree145ce72f53c9830e1f9ee8498b5e81ef891eeb8f /Documentation
parent41dd128c2144b3f3a53a146b539db60a2269734f (diff)
downloadhistory-a581734327bffe26ceda1ecf9916785d31688e31.tar.gz
[PATCH] Laptop mode control script support for XFS *_centisecs sysctl values.
From: Bart Samwel <bart@samwel.tk> XFS now uses /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/age_buffer_centisecs Here's a patch to support these values in the laptop mode control script.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/laptop-mode.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/laptop-mode.txt b/Documentation/laptop-mode.txt
index a0c8f2ce43dbe9..6abde192d5c2e6 100644
--- a/Documentation/laptop-mode.txt
+++ b/Documentation/laptop-mode.txt
@@ -350,19 +350,28 @@ case "$1" in
echo -n "Starting laptop_mode"
if [ -d /proc/sys/vm/pagebuf ] ; then
+ # (For 2.4 and early 2.6.)
# This only needs to be set, not reset -- it is only used when
# laptop mode is enabled.
echo $XFS_AGE > /proc/sys/vm/pagebuf/lm_flush_age
echo $XFS_AGE > /proc/sys/fs/xfs/lm_sync_interval
elif [ -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
+ # (A couple of early 2.6 laptop mode patches had these.)
# The same goes for these.
echo $XFS_AGE > /proc/sys/fs/xfs/lm_age_buffer
echo $XFS_AGE > /proc/sys/fs/xfs/lm_sync_interval
elif [ -f /proc/sys/fs/xfs/age_buffer ] ; then
+ # (2.6.6)
# But not for these -- they are also used in normal
# operation.
echo $XFS_AGE > /proc/sys/fs/xfs/age_buffer
echo $XFS_AGE > /proc/sys/fs/xfs/sync_interval
+ elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
+ # (2.6.7 upwards)
+ # And not for these either. These are in centisecs,
+ # not USER_HZ, so we have to use $AGE, not $XFS_AGE.
+ echo $AGE > /proc/sys/fs/xfs/age_buffer_centisecs
+ echo $AGE > /proc/sys/fs/xfs/xfssyncd_centisecs
fi
case "$KLEVEL" in
@@ -403,9 +412,13 @@ case "$1" in
echo -n "Stopping laptop_mode"
echo "0" > /proc/sys/vm/laptop_mode
if [ -f /proc/sys/fs/xfs/age_buffer ] && [ ! -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
- # These need to be restored though, if there are no lm_*.
+ # These need to be restored, if there are no lm_*.
echo "$(($XFS_HZ*$DEF_XFS_AGE_BUFFER))" > /proc/sys/fs/xfs/age_buffer
echo "$(($XFS_HZ*$DEF_XFS_SYNC_INTERVAL))" > /proc/sys/fs/xfs/sync_interval
+ elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
+ # These need to be restored as well.
+ echo "$((100*$DEF_XFS_AGE_BUFFER))" > /proc/sys/fs/xfs/age_buffer_centisecs
+ echo "$((100*$DEF_XFS_SYNC_INTERVAL))" > /proc/sys/fs/xfs/xfssyncd_centisecs
fi
case "$KLEVEL" in
"2.4")