From 9689a07a04feee0d5f5de3f44ff22de85b0e5d2e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 6 Nov 2018 15:40:19 -0500 Subject: [PATCH] drop avoid-long-hold-times --- avoid-long-hold-times | 56 --------------------------------------------------- series | 1 - 2 files changed, 57 deletions(-) delete mode 100644 avoid-long-hold-times diff --git a/avoid-long-hold-times b/avoid-long-hold-times deleted file mode 100644 index 93bb60c2..00000000 --- a/avoid-long-hold-times +++ /dev/null @@ -1,56 +0,0 @@ -jbd2: avoid long hold times of j_state_lock while committing a transaction - -From: Jan Kara - -We can hold j_state_lock for writing at the beginning of -jbd2_journal_commit_transaction() for a rather long time (reportedly -for 30 ms) due cleaning revoke bits of all revoked buffers under -it. The handling of revoke tables as well as cleaning of -t_reserved_list, and checkpoint lists does not need j_state_lock for -anything. Furthermore the transaction is in T_LOCKED state and we -waited for all outstanding handles so nobody is going to be adding -anything to the transaction. - -Just drop the lock for unnecessary operations. - -Reported-and-tested-by: Adrian Hunter -Signed-off-by: Jan Kara -Signed-off-by: Theodore Ts'o ---- - fs/jbd2/commit.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c -index 150cc030b4d7..356b75fa3101 100644 ---- a/fs/jbd2/commit.c -+++ b/fs/jbd2/commit.c -@@ -422,6 +422,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) - stats.run.rs_locked); - stats.run.rs_running = jbd2_time_diff(commit_transaction->t_start, - stats.run.rs_locked); -+ write_unlock(&journal->j_state_lock); - - spin_lock(&commit_transaction->t_handle_lock); - while (atomic_read(&commit_transaction->t_updates)) { -@@ -431,9 +432,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) - TASK_UNINTERRUPTIBLE); - if (atomic_read(&commit_transaction->t_updates)) { - spin_unlock(&commit_transaction->t_handle_lock); -- write_unlock(&journal->j_state_lock); - schedule(); -- write_lock(&journal->j_state_lock); - spin_lock(&commit_transaction->t_handle_lock); - } - finish_wait(&journal->j_wait_updates, &wait); -@@ -505,6 +504,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) - atomic_sub(atomic_read(&journal->j_reserved_credits), - &commit_transaction->t_outstanding_credits); - -+ write_lock(&journal->j_state_lock); - trace_jbd2_commit_flushing(journal, commit_transaction); - stats.run.rs_flushing = jiffies; - stats.run.rs_locked = jbd2_time_diff(stats.run.rs_locked, --- -2.16.4 - - diff --git a/series b/series index abb3ce32..e3e941cc 100644 --- a/series +++ b/series @@ -1,6 +1,5 @@ # 33458eaba4df -avoid-long-hold-times avoid-extra-brelse-in-setup_new_flex_group_blocks add-missing-brelse-on-set_flex_bg_block_bitmap_error_path add-missing-brelse-in-add_new_gdb_meta_bg_error_path -- 2.11.4.GIT