Remove BKL removal patches, since they don't seem to be portable on
[ext4-patch-queue.git] / jbd2_user_of_the_jiffes_rounding_code.patch
blobf24783d2c518d4ee7495ccb108dd625423b5d3bf
1 jbd2: Use round-jiffies() function for the "5 second" ext4/jbd2 wakeup
3 From: Mingming Cao <cmm@us.ibm.com>
5 While "every 5 seconds" doesn't sound as a problem, there can be many
6 of these (and these timers do add up over all the kernel). The "5
7 second" wakeup isn't really timing sensitive; in addition even with
8 rounding it'll still happen every 5 seconds (with the exception of the
9 very first time, which is likely to be rounded up to somewhere closer
10 to 6 seconds)
12 (Ported from similar JBD patch made by Arjan van de Ven to
13 fs/jbd/transaction.c)
15 Cc: Arjan van de Ven <arjan@linux.intel.com>
16 Cc: Andrew Morton <akpm@osdl.org>
17 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
18 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
20 ---
21 fs/jbd2/transaction.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 Index: linux-2.6.24-rc7/fs/jbd2/transaction.c
25 ===================================================================
26 --- linux-2.6.24-rc7.orig/fs/jbd2/transaction.c 2008-01-16 15:41:14.000000000 -0800
27 +++ linux-2.6.24-rc7/fs/jbd2/transaction.c 2008-01-16 17:49:48.000000000 -0800
28 @@ -54,7 +54,7 @@ jbd2_get_transaction(journal_t *journal,
29 spin_lock_init(&transaction->t_handle_lock);
31 /* Set up the commit timer for the new transaction. */
32 - journal->j_commit_timer.expires = transaction->t_expires;
33 + journal->j_commit_timer.expires = round_jiffies(transaction->t_expires);
34 add_timer(&journal->j_commit_timer);
36 J_ASSERT(journal->j_running_transaction == NULL);