Skip to content

Commit 22ef37e

Browse files
Toshiyuki Okajimatorvalds
authored andcommitted
page-writeback: fix the calculation of the oldest_jif in wb_kupdate()
wb_kupdate() function has a bug on linux-2.6.30-rc5. This bug causes generic_sync_sb_inodes() to start to write inodes back much earlier than our expectations because it miscalculates oldest_jif in wb_kupdate(). This bug was introduced in 704503d ('mm: fix proc_dointvec_userhz_jiffies "breakage"'). Signed-off-by: Toshiyuki Okajima <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent cd208bc commit 22ef37e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/page-writeback.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ unsigned long vm_dirty_bytes;
9494
/*
9595
* The interval between `kupdate'-style writebacks
9696
*/
97-
unsigned int dirty_writeback_interval = 5 * 100; /* sentiseconds */
97+
unsigned int dirty_writeback_interval = 5 * 100; /* centiseconds */
9898

9999
/*
100100
* The longest time for which data is allowed to remain dirty
101101
*/
102-
unsigned int dirty_expire_interval = 30 * 100; /* sentiseconds */
102+
unsigned int dirty_expire_interval = 30 * 100; /* centiseconds */
103103

104104
/*
105105
* Flag that makes the machine dump writes/reads and block dirtyings.
@@ -770,7 +770,7 @@ static void wb_kupdate(unsigned long arg)
770770

771771
sync_supers();
772772

773-
oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval);
773+
oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval * 10);
774774
start_jif = jiffies;
775775
next_jif = start_jif + msecs_to_jiffies(dirty_writeback_interval * 10);
776776
nr_to_write = global_page_state(NR_FILE_DIRTY) +

0 commit comments

Comments
 (0)