Skip to content

jbd2: Avoid unnecessary locking when buffer is already journaled

Jan Kara linux-ext4 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 14 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5jbd2: Simplify code flow in do_get_write_access()fs/jbd2/transaction.c+25 -171 reply
2/5jbd2: Simplify error path on allocation failure in do_get_write_access()fs/jbd2/transaction.c+1 -21 reply
3/5jbd2: Simplify code flow in do_get_write_access()fs/jbd2/transaction.c+55 -581 reply
4/5jbd2: Speedup jbd2_journal_get_[write|undo]_access()fs/jbd2/journal.c fs/jbd2/transaction.c+73 -57 replies
5/5jbd2: Speedup jbd2_journal_dirty_metadata()fs/jbd2/transaction.c+16 -61 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] jbd2: Avoid unnecessary locking when buffer is already journaled

Hello,

this patch set improves do_get_write_access(), jbd2_journal_get_undo_access(),
and jbd2_journal_dirty_metadata() to be completely lockless in case buffer is already part of an appropriate journalling list. First three patches are independent small cleanups so they can go in right away I think.

The other two patches *should* improve the situation for frequent bitmap or inode table block updates. But frankly, I haven't been able to come up with a load where I'd see significant contention on update of a single buffer (or it's hidden by a larger lock). Similarly we could see improvements when do_get_write_access() would be waiting for buffer lock because buffer is being written out by checkpointing code. But again I wasn't able to hit this reliably.

Ted, you mentioned at Vault you had a setup where frequent do_get_write_access() calls were contending in the revoke code. What was the load exactly? These patches should improve that as well...

Honza