diff options
author | Harshad Shirwadkar <harshadshirwadkar@gmail.com> | 2020-11-05 19:58:59 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-11-06 23:01:03 -0500 |
commit | cc80586a57f704f806b9a1b99a21cd07e37dbedc (patch) | |
tree | 4e6d66192c9d1c2fbe46e812023c41e16283f340 /fs/jbd2 | |
parent | 0bce577bf9cae13ae32d391432d0030e3f67fc1d (diff) | |
download | linux-cc80586a57f704f806b9a1b99a21cd07e37dbedc.tar.gz linux-cc80586a57f704f806b9a1b99a21cd07e37dbedc.tar.bz2 linux-cc80586a57f704f806b9a1b99a21cd07e37dbedc.zip |
jbd2: add todo for a fast commit performance optimization
Fast commit performance can be optimized if commit thread doesn't wait
for ongoing fast commits to complete until the transaction enters
T_FLUSH state. Document this optimization.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20201106035911.1942128-11-harshadshirwadkar@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/commit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index ec516490cb35..b121d7d434c6 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -450,6 +450,15 @@ void jbd2_journal_commit_transaction(journal_t *journal) schedule(); write_lock(&journal->j_state_lock); finish_wait(&journal->j_fc_wait, &wait); + /* + * TODO: by blocking fast commits here, we are increasing + * fsync() latency slightly. Strictly speaking, we don't need + * to block fast commits until the transaction enters T_FLUSH + * state. So an optimization is possible where we block new fast + * commits here and wait for existing ones to complete + * just before we enter T_FLUSH. That way, the existing fast + * commits and this full commit can proceed parallely. + */ } write_unlock(&journal->j_state_lock); |