Skip to content

Commit

Permalink
[PATCH] user of the jiffies rounding code: JBD
Browse files Browse the repository at this point in the history
This patch introduces a user: of the round_jiffies() function; the "5 second"
ext3/jbd wakeup.

While "every 5 seconds" doesn't sound as a problem, there can be many of these
(and these timers do add up over all the kernel).  The "5 second" wakeup isn't
really timing sensitive; in addition even with rounding it'll still happen
every 5 seconds (with the exception of the very first time, which is likely to
be rounded up to somewhere closer to 6 seconds)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Dec 10, 2006
1 parent 4c36a5d commit 44d306e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jbd/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ get_transaction(journal_t *journal, transaction_t *transaction)
spin_lock_init(&transaction->t_handle_lock);

/* Set up the commit timer for the new transaction. */
journal->j_commit_timer.expires = transaction->t_expires;
journal->j_commit_timer.expires = round_jiffies(transaction->t_expires);
add_timer(&journal->j_commit_timer);

J_ASSERT(journal->j_running_transaction == NULL);
Expand Down

0 comments on commit 44d306e

Please sign in to comment.