]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy mq: tweak algorithm that decides when to promote a block
authorJoe Thornber <ejt@redhat.com>
Wed, 22 Oct 2014 13:30:58 +0000 (14:30 +0100)
committerMike Snitzer <snitzer@redhat.com>
Mon, 10 Nov 2014 20:25:29 +0000 (15:25 -0500)
commit22a15fd3bddb2df96b7d0f227f479dea32a44243
tree56f73848b2e70f8a9eb4d97d51b742fc93c3ad0f
parente7f3d82dc7bf6268736f59ed8588622246c4dece
dm cache policy mq: tweak algorithm that decides when to promote a block

Rather than maintaining a separate promote_threshold variable that we
periodically update we now use the hit count of the oldest clean
block.  Also add a fudge factor to discourage demoting dirty blocks.

With some tests this has a sizeable difference, because the old code
was too eager to demote blocks.  For example, device-mapper-test-suite's
git_extract_cache_quick test goes from taking 190 seconds, to 142
(linear on spindle takes 250).

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