]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bfq: Fix computation of shallow depth
authorJan Kara <jack@suse.cz>
Thu, 10 Dec 2020 09:44:33 +0000 (10:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:26:15 +0000 (18:26 +0100)
commitbc68af1fdcac9f80fdcfc940aadb83a85306f2f1
tree186ab52aae2ee4cc8ab8ff7341822f961ed3ae0b
parent2abc54579d1b986801b321901a9f8658e6252199
bfq: Fix computation of shallow depth

[ Upstream commit 6d4d273588378c65915acaf7b2ee74e9dd9c130a ]

BFQ computes number of tags it allows to be allocated for each request type
based on tag bitmap. However it uses 1 << bitmap.shift as number of
available tags which is wrong. 'shift' is just an internal bitmap value
containing logarithm of how many bits bitmap uses in each bitmap word.
Thus number of tags allowed for some request types can be far to low.
Use proper bitmap.depth which has the number of tags instead.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/bfq-iosched.c