summaryrefslogtreecommitdiff
path: root/mm/shrinker_debug.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2023-06-26 16:46:00 +0200
committerMike Snitzer <snitzer@kernel.org>2023-06-27 16:02:18 -0400
commitda8b4fc1f63a01a0eca9338ae338b804c437b51f (patch)
treed4b671cee1d6c6e28a52a760d6757d9deaa1319c /mm/shrinker_debug.c
parent6d50eb4725934fd22f5eeccb401000687c790fd0 (diff)
downloadlwn-da8b4fc1f63a01a0eca9338ae338b804c437b51f.tar.gz
lwn-da8b4fc1f63a01a0eca9338ae338b804c437b51f.zip
dm integrity: only allocate recalculate buffer when needed
dm-integrity preallocated 8MiB buffer for recalculating in the constructor and freed it in the destructor. This wastes memory when the user has many dm-integrity devices. Fix dm-integrity so that the buffer is only allocated when recalculation is in progress; allocate the buffer at the beginning of integrity_recalc() and free it at the end. Note that integrity_recalc() doesn't hold any locks when allocating the buffer, so it shouldn't cause low-memory deadlock. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'mm/shrinker_debug.c')
0 files changed, 0 insertions, 0 deletions