Skip to content

Commit

Permalink
dm cache policy smq: make the cleaner policy write-back more aggressi…
Browse files Browse the repository at this point in the history
…vely

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 <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Joe Thornber authored and Mike Snitzer committed Mar 31, 2017
1 parent 449b668 commit cc7e394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-cache-policy-smq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc7e394

Please sign in to comment.