All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ext4: improve commit path performance for fast commit
@ 2022-03-08 10:51 Harshad Shirwadkar
  2022-03-08 10:51 ` [PATCH 1/5] ext4: convert i_fc_lock to spinlock Harshad Shirwadkar
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Harshad Shirwadkar @ 2022-03-08 10:51 UTC (permalink / raw)
  To: linux-ext4; +Cc: riteshh, jack, tytso, Harshad Shirwadkar

From: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

This patch series supersedes the patch "ext4: remove journal barrier
during fast commit" sent in Feb 2022.

This patch series reworks the fast commit's commit path to improve
overall performance of the commit path. Following optimizations have
been added in this series:

* Avoid having to lock the journal throughout the fast commit.
* Remove tracking of open handles per inode.

With the changes introduced in this patch series, now the commit path
for fast commits is as follows:

 [1] Lock the journal by calling jbd2_journal_lock_updates. This
     ensures that all the exsiting handles finish and no new handles
     can start.
 [2] Mark all the fast commit eligible inodes as undergoing fast commit
     by setting "EXT4_STATE_FC_COMMITTING" state.
 [3] Unlock the journal by calling jbd2_journal_unlock_updates. This allows
     starting of new handles. If new handles try to start an update on
     any of the inodes that are being committed, ext4_fc_track_inode()
     will block until those inodes have finished the fast commit.
 [4] Submit data buffers of all the committing inodes.
 [5] Wait for [4] to complete.
 [6] Commit all the directory entry updates in the fast commit space.
 [7] Commit all the changed inodes in the fast commit space and clear
     "EXT4_STATE_FC_COMMITTING" for all the inodes.
 [8] Write tail tag to ensure atomicity of commits.

(The above flow has been documented in the code as well)

I verified that the patch series introduces no regressions in "quick"
and "log" groups when "fast_commit" feature is enabled.

Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

Harshad Shirwadkar (5):
  ext4: convert i_fc_lock to spinlock
  ext4: drop i_fc_updates from inode fc info
  ext4: for committing inode, make ext4_fc_track_inode wait
  ext4: rework fast commit commit path
  ext4: update code documentation

 fs/ext4/ext4.h        |  12 +--
 fs/ext4/ext4_jbd2.c   |  12 +++
 fs/ext4/ext4_jbd2.h   |  13 +--
 fs/ext4/fast_commit.c | 228 ++++++++++++++++++++----------------------
 fs/ext4/inode.c       |   3 +-
 fs/ext4/super.c       |   2 +-
 fs/jbd2/journal.c     |   2 -
 7 files changed, 134 insertions(+), 138 deletions(-)

-- 
2.35.1.616.g0bdcbb4464-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-03-09  9:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 10:51 [PATCH 0/5] ext4: improve commit path performance for fast commit Harshad Shirwadkar
2022-03-08 10:51 ` [PATCH 1/5] ext4: convert i_fc_lock to spinlock Harshad Shirwadkar
2022-03-08 12:03   ` Jan Kara
2022-03-08 10:51 ` [PATCH 2/5] ext4: drop i_fc_updates from inode fc info Harshad Shirwadkar
2022-03-08 12:07   ` Jan Kara
2022-03-08 10:51 ` [PATCH 3/5] ext4: for committing inode, make ext4_fc_track_inode wait Harshad Shirwadkar
2022-03-08 12:30   ` Jan Kara
2022-03-08 13:06     ` harshad shirwadkar
2022-03-09  9:52       ` Jan Kara
2022-03-08 10:51 ` [PATCH 4/5] ext4: rework fast commit commit path Harshad Shirwadkar
2022-03-08 12:44   ` Jan Kara
2022-03-08 10:51 ` [PATCH 5/5] ext4: update code documentation Harshad Shirwadkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.