]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: calculate statistics without holding j_state_lock and j_list_lock
authorTheodore Ts'o <tytso@mit.edu>
Sun, 9 Mar 2014 00:51:16 +0000 (19:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 9 Mar 2014 00:51:16 +0000 (19:51 -0500)
commit0966141a45a447eb0ed9cb2b1f6486090f8a7e3e
tree106d8e934c1c930d4fae822c76ff18d493492729
parent2b89842e58bb77987a4369a99082561f2fad5844
jbd2: calculate statistics without holding j_state_lock and j_list_lock

The two hottest locks, and thus the biggest scalability bottlenecks,
in the jbd2 layer, are the j_list_lock and j_state_lock.  This has
inspired some people to do some truly unnatural things[1].

[1] https://www.usenix.org/system/files/conference/fast14/fast14-paper_kang.pdf

We don't need to be holding both j_state_lock and j_list_lock while
calculating the journal statistics, so move those calculations to the
very end of jbd2_journal_commit_transaction.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/jbd2/commit.c