dm stats: add cond_resched when looping over entries
authorMikulas Patocka <mpatocka@redhat.com>
Sun, 24 Apr 2022 20:43:00 +0000 (16:43 -0400)
committerMike Snitzer <snitzer@kernel.org>
Mon, 9 May 2022 16:11:07 +0000 (12:11 -0400)
commitbfe2b0146c4d0230b68f5c71a64380ff8d361f8b
treebac12df0337c638ad875c54304fb6ffd0ea95872
parent4edadf6dcb54d2a86eeb424f27122dc0076d9267
dm stats: add cond_resched when looping over entries

dm-stats can be used with a very large number of entries (it is only
limited by 1/4 of total system memory), so add rescheduling points to
the loops that iterate over the entries.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-stats.c