Skip to content

Commit

Permalink
page-writeback: fix the calculation of the oldest_jif in wb_kupdate()
Browse files Browse the repository at this point in the history
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 <toshi.okajima@jp.fujitsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Toshiyuki Okajima authored and Linus Torvalds committed May 17, 2009
1 parent cd208bc commit 22ef37e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ unsigned long vm_dirty_bytes;
/*
* The interval between `kupdate'-style writebacks
*/
unsigned int dirty_writeback_interval = 5 * 100; /* sentiseconds */
unsigned int dirty_writeback_interval = 5 * 100; /* centiseconds */

/*
* The longest time for which data is allowed to remain dirty
*/
unsigned int dirty_expire_interval = 30 * 100; /* sentiseconds */
unsigned int dirty_expire_interval = 30 * 100; /* centiseconds */

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

sync_supers();

oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval);
oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval * 10);
start_jif = jiffies;
next_jif = start_jif + msecs_to_jiffies(dirty_writeback_interval * 10);
nr_to_write = global_page_state(NR_FILE_DIRTY) +
Expand Down

0 comments on commit 22ef37e

Please sign in to comment.