jbd2: increase the journal IO's priority
authorZhang Yi <yi.zhang@huawei.com>
Wed, 29 Nov 2023 11:47:40 +0000 (19:47 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Dec 2023 04:27:39 +0000 (23:27 -0500)
commit6a3afb6ac6dfab158ebdd4b87941178f58c8939f
treefbbbf93a03dc5f3fb08947e8060dbe1aa0c5f334
parent85559227211020b270728104c3b89918f7af27ac
jbd2: increase the journal IO's priority

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>
fs/jbd2/commit.c
fs/jbd2/journal.c
include/linux/jbd2.h