summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2012-12-18 18:03:57 +0100
committerJan Kara <jack@suse.cz>2013-01-14 22:50:45 +0100
commit7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1 (patch)
tree1550cc5840d8a4323fe5f6357da227436cd542ec /fs
parentMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadlinux-7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1.tar.xz
linux-7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1.zip
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')
-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)
* currently running transaction (if it exists). Otherwise,
* the target tid must be an old one.
*/
- if (journal->j_running_transaction &&
+ if (journal->j_commit_request != target &&
+ journal->j_running_transaction &&
journal->j_running_transaction->t_tid == target) {
/*
* We want a new commit: OK, mark the request and wakeup the