Skip to content

Commit 7e2fb2d

Browse files
Eric Sandeenjankara
authored andcommitted
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>
1 parent b719f43 commit 7e2fb2d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/jbd/journal.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ int __log_start_commit(journal_t *journal, tid_t target)
446446
* currently running transaction (if it exists). Otherwise,
447447
* the target tid must be an old one.
448448
*/
449-
if (journal->j_running_transaction &&
449+
if (journal->j_commit_request != target &&
450+
journal->j_running_transaction &&
450451
journal->j_running_transaction->t_tid == target) {
451452
/*
452453
* We want a new commit: OK, mark the request and wakeup the

0 commit comments

Comments
 (0)