[dm-devel] dm-cache: Promote-Demote Policy. How it works ?

BK, GirishKumar GirishKumar.BK at netapp.com
Mon Feb 9 13:19:44 UTC 2015


HI,

I'm new and trying to understand how exactly the "read_promote_adjustment" and "write_promote_adjustment" work in dm-cache. From the description in the http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L45 its not clear as to how promotion works.

For example:

 61<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L61> Internally the mq policy maintains a promotion threshold variable.  If
 62<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L62> the hit count of a block not in the cache goes above this threshold it
 63<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L63> gets promoted to the cache.

Here, the hit count is mentioned for the block not in cache.  Which means that, blocks are not moved to cache unless there are susequent requests for the same block until the read_promote_thresold is reached.  Meaning all those time the data was being read from slower disk.  Why isn't the block moved to cache on first miss ?

What does write_promote_adjustment mean here ? Meaning after this count reaches some threshold ( not sure how this count is incremented ?) then the dirty data from cache is written to slow disk ?

Can anyone please the scenarios under which each of the counters used ?

Thanks,

/Girish BK












45<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L45>         'read_promote_adjustment <value>'
 46<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L46>         'write_promote_adjustment <value>'
 47<http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L47>         'discard_promote_adjustment <value>'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20150209/f3ecbba6/attachment.htm>


More information about the dm-devel mailing list