linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1 0/2] jbd2: Kill age-old t_handle_lock transaction spinlock
@ 2022-01-23 17:23 Ritesh Harjani
  2022-01-23 17:23 ` [PATCHv1 1/2] jbd2: Kill " Ritesh Harjani
  2022-01-23 17:23 ` [PATCHv1 2/2] jbd2: Remove CONFIG_JBD2_DEBUG to update t_max_wait Ritesh Harjani
  0 siblings, 2 replies; 5+ messages in thread
From: Ritesh Harjani @ 2022-01-23 17:23 UTC (permalink / raw)
  To: linux-ext4; +Cc: linux-kernel, linux-fsdevel, Jan Kara, tytso, Ritesh Harjani

Hello,

This small patch series kills the age-old t_handle_lock transaction spinlock,
which on careful inspection, came out to be not very useful anymore.
At some of the places it isn't required at all now and for the rest
(e.g. update_t_max_wait()), we could make use of atomic cmpxchg to make the
code path lockless.

This was tested with fstests with -g quick and -g log on my qemu setup.
I had also done some extensive fsmark testing to see that we don't see any
bottleneck resulting from removal of CONFIG_JBD2_DEBUG to update t_max_wait
in patch-2. None of my test showed any bottleneck.

Note that there had been several patches in the past over time which had led to
t_handle_lock becoming obselete now e.g. [1-2]
In this work, couple of the code paths to remove this spinlock were observed
while doing code review and to get completely rid of it was something which was
suggested by Jan [3].
Thanks to Jan for thorough review and suggestions :)


[1]: https://lore.kernel.org/linux-ext4/1280939957-3277-4-git-send-email-tytso@mit.edu/
[2]: https://lore.kernel.org/linux-ext4/20120103153245.GE31457@quack.suse.cz/
[3]: https://lore.kernel.org/linux-ext4/20220113112749.d5tfszcksvxvshnn@quack3.lan/

Ritesh Harjani (2):
  jbd2: Kill t_handle_lock transaction spinlock
  jbd2: Remove CONFIG_JBD2_DEBUG to update t_max_wait

 fs/jbd2/transaction.c | 36 ++++++++++++------------------------
 include/linux/jbd2.h  |  3 ---
 2 files changed, 12 insertions(+), 27 deletions(-)

--
2.31.1


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

end of thread, other threads:[~2022-01-24  9:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-23 17:23 [PATCHv1 0/2] jbd2: Kill age-old t_handle_lock transaction spinlock Ritesh Harjani
2022-01-23 17:23 ` [PATCHv1 1/2] jbd2: Kill " Ritesh Harjani
2022-01-24  9:11   ` Jan Kara
2022-01-23 17:23 ` [PATCHv1 2/2] jbd2: Remove CONFIG_JBD2_DEBUG to update t_max_wait Ritesh Harjani
2022-01-24  9:12   ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).