提交 a8cd1eba 编写于 作者: J Joe Thornber 提交者: Mike Snitzer

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: NJoe Thornber <ejt@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 072792dc
...@@ -1190,7 +1190,7 @@ static void queue_demotion(struct smq_policy *mq) ...@@ -1190,7 +1190,7 @@ static void queue_demotion(struct smq_policy *mq)
if (unlikely(WARN_ON_ONCE(!mq->migrations_allowed))) if (unlikely(WARN_ON_ONCE(!mq->migrations_allowed)))
return; 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 (!e) {
if (!clean_target_met(mq, false)) if (!clean_target_met(mq, false))
queue_writeback(mq); queue_writeback(mq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册