Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8c3400a7 authored by Ming-Hung Tsai's avatar Ming-Hung Tsai Committed by Greg Kroah-Hartman
Browse files

dm cache: optimize dirty bit checking with find_next_bit when resizing



commit f484697e619a83ecc370443a34746379ad99d204 upstream.

When shrinking the fast device, dm-cache iteratively searches for a
dirty bit among the cache blocks to be dropped, which is less efficient.
Use find_next_bit instead, as it is twice as fast as the iterative
approach with test_bit.

Signed-off-by: default avatarMing-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Acked-by: default avatarJoe Thornber <thornber@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8501e38d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment