mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
dm writecache: set a default MAX_WRITEBACK_JOBS
[ Upstream commit ca7dc242e3
]
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>
This commit is contained in:
parent
10bc71642f
commit
9769bd964d
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define HIGH_WATERMARK 50
|
||||
#define LOW_WATERMARK 45
|
||||
#define MAX_WRITEBACK_JOBS 0
|
||||
#define MAX_WRITEBACK_JOBS min(0x10000000 / PAGE_SIZE, totalram_pages() / 16)
|
||||
#define ENDIO_LATENCY 16
|
||||
#define WRITEBACK_LATENCY 64
|
||||
#define AUTOCOMMIT_BLOCKS_SSD 65536
|
||||
|
|
Loading…
Reference in a new issue