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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 Internally the mq policy maintains a promotion threshold variable.  If
 62 the hit count of a block not in the cache goes above this threshold it
 63 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         'read_promote_adjustment <value>'
 46         'write_promote_adjustment <value>'
 47         'discard_promote_adjustment <value>'
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux