]> git.baikalelectronics.ru Git - kernel.git/commit
dm writecache: set a default MAX_WRITEBACK_JOBS
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 13 Jul 2022 11:09:04 +0000 (07:09 -0400)
committerMike Snitzer <snitzer@kernel.org>
Thu, 14 Jul 2022 19:52:31 +0000 (15:52 -0400)
commit1e0cba17863a72714ee5764bfda25e877a534a5d
treee1af77a46c8c316dacefbcc2b9a713edd76de52c
parent9c3f03333c98b088e87db1853a50085be96941f3
dm writecache: set a default MAX_WRITEBACK_JOBS

dm-writecache has the capability to limit the number of writeback jobs
in progress. However, this feature was off by default. As such there
were some out-of-memory crashes observed when lowering the low
watermark while the cache is full.

This commit enables writeback limit by default. It is set to 256MiB or
1/16 of total system memory, whichever is smaller.

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