]> git.baikalelectronics.ru Git - kernel.git/commit
dm bufio: evict buffers that are past the max age but retain some buffers
authorJoe Thornber <ejt@redhat.com>
Thu, 9 Oct 2014 10:10:25 +0000 (11:10 +0100)
committerMike Snitzer <snitzer@redhat.com>
Mon, 10 Nov 2014 20:25:26 +0000 (15:25 -0500)
commitf09f955d317379ac75486a16216eaea9296a7b63
tree1814ee0de89579652025599746cae9c7fa942aed
parentb484b2efbfbb48f8ccbef3a1f5a1d6e809b056f4
dm bufio: evict buffers that are past the max age but retain some buffers

These changes help keep metadata backed by dm-bufio in-core longer which
fixes reports of metadata churn in the face of heavy random IO workloads.

Before, bufio evicted all buffers older than DM_BUFIO_DEFAULT_AGE_SECS.
Having a device (e.g. dm-thinp or dm-cache) lose all metadata just
because associated buffers had been idle for some time is unfriendly.

Now, the user may now configure the number of bytes that bufio retains
using the 'retain_bytes' module parameter.  The default is 256K.

Also, the DM_BUFIO_WORK_TIMER_SECS and DM_BUFIO_DEFAULT_AGE_SECS
defaults were quite low so increase them (to 30 and 300 respectively).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-bufio.c