]> www.infradead.org Git - users/jedix/linux-maple.git/commit
jbd2: Avoid long replay times due to high number or revoke blocks
authorJan Kara <jack@suse.cz>
Tue, 21 Jan 2025 14:09:26 +0000 (15:09 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Feb 2025 05:19:10 +0000 (00:19 -0500)
commita399af4e3b1ab2c5d83292d4487c4d18de551659
treec8aeb1808554b093b5eef8b53761d679b3227273
parent2890e5e0f49e10f3dadc5f7b7ea434e3e77e12a6
jbd2: Avoid long replay times due to high number or revoke blocks

Some users are reporting journal replay takes a long time when there is
excessive number of revoke blocks in the journal. Reported times are
like:

1048576 records - 95 seconds
2097152 records - 580 seconds

The problem is that hash chains in the revoke table gets excessively
long in these cases. Fix the problem by sizing the revoke table
appropriately before the revoke pass.

Thanks to Alexey Zhuravlev <azhuravlev@ddn.com> for benchmarking the
patch with large numbers of revoke blocks [1].

[1] https://lore.kernel.org/all/20250113183107.7bfef7b6@x390.bzzz77.ru

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250121140925.17231-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/recovery.c
fs/jbd2/revoke.c
include/linux/jbd2.h