dm bufio: add lock_history optimization for cache iterators
authorJoe Thornber <ejt@redhat.com>
Sat, 25 Mar 2023 03:01:03 +0000 (23:01 -0400)
committerMike Snitzer <snitzer@kernel.org>
Thu, 30 Mar 2023 19:57:50 +0000 (15:57 -0400)
commit791188065be0d3715e6696412ab9c7a5f6b52bd3
tree9a91f18e076ec9ca4440ed75c0e169619970280d
parent450e8dee51aa6fa1dd0f64073e88235f1a77b035
dm bufio: add lock_history optimization for cache iterators

Sometimes it is beneficial to repeatedly get and drop locks as part of
an iteration.  Introduce lock_history struct to help avoid redundant
drop and gets of the same lock.

Optimizes cache_iterate, cache_mark_many and cache_evict.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-bufio.c