]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:23 +0000 (14:24 +0200)
commit6036df2c9c937d6c53cf1ec8cc36c7a4a687c0b2
treeaaa3a6499c6bfb8ef796ff5989cc9e316c3e854c
parentfa3311ea5ff550ad8797777caa3f3031f6b5e8c7
dm writecache: set a default MAX_WRITEBACK_JOBS

[ Upstream commit 1e0cba17863a72714ee5764bfda25e877a534a5d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-writecache.c