diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2017-04-30 23:34:53 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-05-01 21:21:42 +0200 |
commit | 390020ad2af9ca04844c4f3b1f299ad8746d84c8 (patch) | |
tree | a89be3c8cd0ad3b0959c12eb534c288be9669597 /drivers/md/Makefile | |
parent | dm bufio: avoid a possible ABBA deadlock (diff) | |
download | linux-390020ad2af9ca04844c4f3b1f299ad8746d84c8.tar.xz linux-390020ad2af9ca04844c4f3b1f299ad8746d84c8.zip |
dm bufio: check new buffer allocation watermark every 30 seconds
dm-bufio checks a watermark when it allocates a new buffer in
__bufio_new(). However, it doesn't check the watermark when the user
changes /sys/module/dm_bufio/parameters/max_cache_size_bytes.
This may result in a problem - if the watermark is high enough so that
all possible buffers are allocated and if the user lowers the value of
"max_cache_size_bytes", the watermark will never be checked against the
new value because no new buffer would be allocated.
To fix this, change __evict_old_buffers() so that it checks the
watermark. __evict_old_buffers() is called every 30 seconds, so if the
user reduces "max_cache_size_bytes", dm-bufio will react to this change
within 30 seconds and decrease memory consumption.
Depends-on: 1b0fb5a5b2 ("dm bufio: avoid a possible ABBA deadlock")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/Makefile')
0 files changed, 0 insertions, 0 deletions