]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jbd2: increase the journal IO's priority
authorZhang Yi <yi.zhang@huawei.com>
Wed, 29 Nov 2023 11:47:40 +0000 (19:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:50:06 +0000 (11:50 +0100)
commit28c9fced8ddfea9bcbcece3b3d0246193364a26a
tree108896697487575b3e4eb1965724495939c68201
parent6b15330693ac4303d3d4dc38d26f4787d6f92945
jbd2: increase the journal IO's priority

[ Upstream commit 6a3afb6ac6dfab158ebdd4b87941178f58c8939f ]

Current jbd2 only add REQ_SYNC for descriptor block, metadata log
buffer, commit buffer and superblock buffer, the submitted IO could be
throttled by writeback throttle in block layer, that could lead to
priority inversion in some cases. The log IO looks like a kind of high
priority metadata IO, so it should not be throttled by WBT like QOS
policies in block layer, let's add REQ_SYNC | REQ_IDLE to exempt from
writeback throttle, and also add REQ_META together indicates it's a
metadata IO.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20231129114740.2686201-2-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jbd2/commit.c
fs/jbd2/journal.c
include/linux/jbd2.h