diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2023-11-29 19:47:40 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-20 11:50:06 +0100 |
commit | 28c9fced8ddfea9bcbcece3b3d0246193364a26a (patch) | |
tree | 108896697487575b3e4eb1965724495939c68201 /include | |
parent | 6b15330693ac4303d3d4dc38d26f4787d6f92945 (diff) | |
download | linux-stable-28c9fced8ddfea9bcbcece3b3d0246193364a26a.tar.gz linux-stable-28c9fced8ddfea9bcbcece3b3d0246193364a26a.tar.bz2 linux-stable-28c9fced8ddfea9bcbcece3b3d0246193364a26a.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/jbd2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index ebb1608d9dcd..6611af5f1d0c 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -1374,6 +1374,9 @@ JBD2_FEATURE_INCOMPAT_FUNCS(csum2, CSUM_V2) JBD2_FEATURE_INCOMPAT_FUNCS(csum3, CSUM_V3) JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT) +/* Journal high priority write IO operation flags */ +#define JBD2_JOURNAL_REQ_FLAGS (REQ_META | REQ_SYNC | REQ_IDLE) + /* * Journal flag definitions */ |