<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"><div>HI,</div></pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);">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 <a href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L45" style="font-family: Calibri, sans-serif; font-size: 14px;">http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L45</a> its not clear as to how promotion works.</pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold;">For example: </pre>
<pre style="padding: 1em; overflow: auto;"><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);"> <a name="L61" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L61" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">61</a> Internally the mq policy maintains a promotion threshold variable.  If
 <a name="L62" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L62" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">62</a> the hit count of a block not in the cache goes above this threshold it
 <a name="L63" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L63" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">63</a> gets promoted to the cache. </pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);">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 ?</pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);">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 ?</pre><pre style="padding: 1em; overflow: auto;"><span style="background-color: rgb(255, 254, 254);"><font color="#787878" face="Monaco,Courier New,Courier,monospace"><span style="font-size: 0.95em;"><b>Can anyone please the scenarios under which each of the counters used ? </b></span></font></span></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto;"><span style="background-color: rgb(255, 254, 254);">Thanks,</span></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto;"><span style="background-color: rgb(254, 253, 253);">/Girish BK</span></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto;"><span style="background-color: rgb(255, 254, 254);"><br></span></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);"><br></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);"><br></pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);"> </pre><pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; font-weight: bold; padding: 1em; overflow: auto; background-color: rgb(255, 255, 255);"><br></pre></pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"><br></pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"><br></pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"> </pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"><br></pre>
<pre style="color: rgb(120, 120, 120); font-family: Monaco, 'Courier New', Courier, monospace; font-size: 0.95em; padding: 1em; overflow: auto; font-weight: bold; background-color: rgb(255, 255, 255);"><a name="L45" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L45" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">45</a>         'read_promote_adjustment <value>'
 <a name="L46" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L46" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">46</a>         'write_promote_adjustment <value>'
 <a name="L47" href="http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-policies.txt#L47" style="text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(153, 153, 153); color: black;">47</a>         'discard_promote_adjustment <value>'</pre>
</body>
</html>