]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/md/dm-cache-policy-smq.c
dm cache policy smq: allow demotions to happen even during continuous IO
[linux.git] / drivers / md / dm-cache-policy-smq.c
index e0c40aec5e964eb1428f53ee5e84814d7ba9b75a..d13d9edf8dfe4dc55d88065df4417c8f9ba94942 100644 (file)
@@ -1214,7 +1214,11 @@ static void queue_promotion(struct smq_policy *mq, dm_oblock_t oblock,
                return;
 
        if (allocator_empty(&mq->cache_alloc)) {
-               if (!free_target_met(mq, false))
+               /*
+                * We always claim to be 'idle' to ensure some demotions happen
+                * with continuous loads.
+                */
+               if (!free_target_met(mq, true))
                        queue_demotion(mq);
                return;
        }