summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-policy-smq.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2017-05-11 05:11:06 -0400
committerMike Snitzer <snitzer@redhat.com>2017-05-14 21:54:33 -0400
commit4d44ec5ab751be63c5d348f13294304d87baa8c3 (patch)
tree5892bf620cf814552047025079d2dda7cbb1b224 /drivers/md/dm-cache-policy-smq.c
parent78c45607b909fb384c47c134d89b39285a6a8b45 (diff)
downloadlinux-stable-4d44ec5ab751be63c5d348f13294304d87baa8c3.tar.gz
linux-stable-4d44ec5ab751be63c5d348f13294304d87baa8c3.tar.bz2
linux-stable-4d44ec5ab751be63c5d348f13294304d87baa8c3.zip
dm cache policy smq: put newly promoted entries at the top of the multiqueue
This stops entries bouncing in and out of the cache quickly. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-policy-smq.c')
-rw-r--r--drivers/md/dm-cache-policy-smq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-policy-smq.c b/drivers/md/dm-cache-policy-smq.c
index 5aa8f43856c5..54421a846a0c 100644
--- a/drivers/md/dm-cache-policy-smq.c
+++ b/drivers/md/dm-cache-policy-smq.c
@@ -1452,6 +1452,7 @@ static void __complete_background_work(struct smq_policy *mq,
clear_pending(mq, e);
if (success) {
e->oblock = work->oblock;
+ e->level = NR_CACHE_LEVELS - 1;
push(mq, e);
// h, q, a
} else {