diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-03-31 18:23:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:13 -0400 |
commit | 704503d836042d4a4c7685b7036e7de0418fbc0f (patch) | |
tree | 218bea088f0b286981221e44d5247dab98020d30 /include/linux/writeback.h | |
parent | 6a11f75b6a17b5d9ac5025f8d048382fd1f47377 (diff) |
mm: fix proc_dointvec_userhz_jiffies "breakage"
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9838
On i386, HZ=1000, jiffies_to_clock_t() converts time in a somewhat strange
way from the user's point of view:
# echo 500 >/proc/sys/vm/dirty_writeback_centisecs
# cat /proc/sys/vm/dirty_writeback_centisecs
499
So, we have 5000 jiffies converted to only 499 clock ticks and reported
back.
TICK_NSEC = 999848
ACTHZ = 256039
Keeping in-kernel variable in units passed from userspace will fix issue
of course, but this probably won't be right for every sysctl.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r-- | include/linux/writeback.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 7300ecdc480..93445477f86 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -109,8 +109,8 @@ extern int dirty_background_ratio; | |||
109 | extern unsigned long dirty_background_bytes; | 109 | extern unsigned long dirty_background_bytes; |
110 | extern int vm_dirty_ratio; | 110 | extern int vm_dirty_ratio; |
111 | extern unsigned long vm_dirty_bytes; | 111 | extern unsigned long vm_dirty_bytes; |
112 | extern int dirty_writeback_interval; | 112 | extern unsigned int dirty_writeback_interval; |
113 | extern int dirty_expire_interval; | 113 | extern unsigned int dirty_expire_interval; |
114 | extern int vm_highmem_is_dirtyable; | 114 | extern int vm_highmem_is_dirtyable; |
115 | extern int block_dump; | 115 | extern int block_dump; |
116 | extern int laptop_mode; | 116 | extern int laptop_mode; |