diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-12-18 11:03:57 -0600 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-01-14 22:50:45 +0100 |
commit | 7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1 (patch) | |
tree | 1550cc5840d8a4323fe5f6357da227436cd542ec /fs/jbd | |
parent | b719f43059903820c31edb30f4663a2818836e7f (diff) | |
download | lwn-7e2fb2d7e6a3094473f101ae33dd6431ae6d2ed1.tar.gz lwn-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/jbd')
-rw-r--r-- | fs/jbd/journal.c | 3 |
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 |