diff options
author | Bart Samwel <bart@samwel.tk> | 2006-03-24 06:15:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:20 -0500 |
commit | ed5b43f15a8e86e3ae939b98bc161ee973ecedf2 (patch) | |
tree | dcd5bc0b5817d6452b0897a08293317f470f4db9 /mm | |
parent | f6ef943813ac3085ece7252ea101d663581219f6 (diff) |
[PATCH] Represent laptop_mode as jiffies internally
Make that the internal value for /proc/sys/vm/laptop_mode is stored as
jiffies instead of seconds. Let the sysctl interface do the conversions,
instead of doing on-the-fly conversions every time the value is used.
Add a description of the fact that laptop_mode doubles as a flag and a
timeout to the comment above the laptop_mode variable.
Signed-off-by: Bart Samwel <bart@samwel.tk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index e79107991d20..c1052ee79f01 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -88,7 +88,8 @@ int dirty_expire_interval = 30 * HZ; | |||
88 | int block_dump; | 88 | int block_dump; |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Flag that puts the machine in "laptop mode". | 91 | * Flag that puts the machine in "laptop mode". Doubles as a timeout in jiffies: |
92 | * a full sync is triggered after this time elapses without any disk activity. | ||
92 | */ | 93 | */ |
93 | int laptop_mode; | 94 | int laptop_mode; |
94 | 95 | ||
@@ -468,7 +469,7 @@ static void laptop_timer_fn(unsigned long unused) | |||
468 | */ | 469 | */ |
469 | void laptop_io_completion(void) | 470 | void laptop_io_completion(void) |
470 | { | 471 | { |
471 | mod_timer(&laptop_mode_wb_timer, jiffies + laptop_mode * HZ); | 472 | mod_timer(&laptop_mode_wb_timer, jiffies + laptop_mode); |
472 | } | 473 | } |
473 | 474 | ||
474 | /* | 475 | /* |