]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy mq: try not to writeback data that changed in the last second
authorJoe Thornber <ejt@redhat.com>
Fri, 20 Feb 2015 14:22:17 +0000 (14:22 +0000)
committerMike Snitzer <snitzer@redhat.com>
Tue, 31 Mar 2015 16:03:48 +0000 (12:03 -0400)
commit754c1b54fb4f7881709199437478ea9caf5eaf9a
tree64f115b6ea2912e0605be69e45839d16fcf2c924
parentfbaadb0b706b4957ed9f0207cb3ceb2178f01890
dm cache policy mq: try not to writeback data that changed in the last second

Writeback takes out a lock on the cache block, so will increase the
latency for any concurrent io.

This patch works by placing 2 sentinel objects on each level of the
multiqueues.  Every WRITEBACK_PERIOD the oldest sentinel gets moved to
the newest end of the queue level.

When looking for writeback work:
  if less than 25% of the cache is clean:
    we select the oldest object with the lowest hit count
  otherwise:
    we select the oldest object that is not past a writeback sentinel.

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