aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2012-12-18 12:03:57 -0500
committerJan Kara <jack@suse.cz>2013-01-14 16:50:45 -0500
commit7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1 (patch)
tree1550cc5840d8a4323fe5f6357da227436cd542ec /fs/jbd
parentb719f43059903820c31edb30f4663a2818836e7f (diff)
jbd: don't wake kjournald unnecessarily
Don't send an extra wakeup to kjournald in the case where we already have the proper target in j_commit_request, i.e. that commit has already been requested for commit. commit d9b0193 "jbd: fix fsync() tid wraparound bug" changed the logic leading to a wakeup, but it caused some extra wakeups which were found to lead to a measurable performance regression. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/jbd')
-rw-r--r--fs/jbd/journal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index a2862339323b..81cc7eaff863 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -446,7 +446,8 @@ int __log_start_commit(journal_t *journal, tid_t target)
446 * currently running transaction (if it exists). Otherwise, 446 * currently running transaction (if it exists). Otherwise,
447 * the target tid must be an old one. 447 * the target tid must be an old one.
448 */ 448 */
449 if (journal->j_running_transaction && 449 if (journal->j_commit_request != target &&
450 journal->j_running_transaction &&
450 journal->j_running_transaction->t_tid == target) { 451 journal->j_running_transaction->t_tid == target) {
451 /* 452 /*
452 * We want a new commit: OK, mark the request and wakeup the 453 * We want a new commit: OK, mark the request and wakeup the