From: Joe Thornber Date: Fri, 31 Mar 2017 14:46:54 +0000 (-0400) Subject: dm cache policy smq: make the cleaner policy write-back more aggressively X-Git-Tag: v4.12-rc1~120^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc7e394024770d4bfd8463fab1a9e2e262a7d7c1;p=platform%2Fkernel%2Flinux-exynos.git dm cache policy smq: make the cleaner policy write-back more aggressively By ignoring the sentinels the cleaner policy is able to write-back dirty cache data much faster. There is no reason to respect the sentinels, which denote that a block was changed recently, when using the cleaner policy given that the cleaner is tasked with writing back all dirty data. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-cache-policy-smq.c b/drivers/md/dm-cache-policy-smq.c index 74436dc..e0c40ae 100644 --- a/drivers/md/dm-cache-policy-smq.c +++ b/drivers/md/dm-cache-policy-smq.c @@ -1166,7 +1166,7 @@ static void queue_writeback(struct smq_policy *mq) struct policy_work work; struct entry *e; - e = q_peek(&mq->dirty, mq->dirty.nr_levels, false); + e = q_peek(&mq->dirty, mq->dirty.nr_levels, !mq->migrations_allowed); if (e) { mark_pending(mq, e); q_del(&mq->dirty, e);