From: Joe Thornber Date: Thu, 11 May 2017 09:07:34 +0000 (-0400) Subject: dm cache policy smq: only demote entries in bottom half of the clean multiqueue X-Git-Tag: MMI-PSA29.97-13-9~5578^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8cd1eba6135e086109e2b94bf96deb17456ede8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git dm cache policy smq: only demote entries in bottom half of the clean multiqueue Heavy IO load may mean there are very few clean blocks in the cache, and we risk demoting entries that get hit a lot. 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 72479bd61e11..a177559f2049 100644 --- a/drivers/md/dm-cache-policy-smq.c +++ b/drivers/md/dm-cache-policy-smq.c @@ -1190,7 +1190,7 @@ static void queue_demotion(struct smq_policy *mq) if (unlikely(WARN_ON_ONCE(!mq->migrations_allowed))) return; - e = q_peek(&mq->clean, mq->clean.nr_levels, true); + e = q_peek(&mq->clean, mq->clean.nr_levels / 2, true); if (!e) { if (!clean_target_met(mq, false)) queue_writeback(mq);