Awesome, it seems ref counting is all the rage nowadays: <a href="http://stackoverflow.com/questions/7424710/does-winrt-have-garbage-collection">http://stackoverflow.com/questions/7424710/does-winrt-have-garbage-collection</a> :)<br>
<br>Manik, I have been looking at your code and I have modified it to not use any loops in acquireLock: <a href="https://github.com/infinispan/infinispan/pull/1382#issuecomment-9683327">https://github.com/infinispan/infinispan/pull/1382#issuecomment-9683327</a><br>
<br>I think it looks better, now I&#39;m curious if it keeps the same throughput...<br><br>Cheers<br>Dan<br><br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 7:16 PM, Manik Surtani <span dir="ltr">&lt;<a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Wow.  Looks like ref counting is a winner.  Simple local mode test, comparing 5.2.0.Beta2 (in red), my fix for ISPN-2381 *without* ref counting (in blue) and with ref counting (in green).<div>
<br></div><div>Weird that read performance is also affected, as these patches are for the lock manager which is not used when reading.  Could be overall resource contention that slows down reader threads.</div><div><br></div>
<div><img src="cid:D9354372-2CC9-4088-B24E-22EC5F78580F@lan" height="713" width="713"><img src="cid:CBF8EFAF-9604-4F05-8CAF-9C4B0A0DB974@lan" height="713" width="713"></div><div><br><div><div><div class="h5"><div>On 19 Oct 2012, at 11:07, Manik Surtani &lt;<a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a>&gt; wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div style="word-wrap:break-word"><br><div><div>On 17 Oct 2012, at 18:19, Jason Greene &lt;<a href="mailto:jason.greene@redhat.com" target="_blank">jason.greene@redhat.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><blockquote type="cite" style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<blockquote type="cite"><br><br>It&#39;s not very fair, because threads that try to lock this key after we have removed the lock from the CHM have an advantage compared to threads that have been waiting for a while on our lock and now have to acquire the lock, unlock, and try again to lock on a new key.<br>
</blockquote><br>Well the locks already aren&#39;t fair right? Also aren&#39;t the only cases of scenario 2 key removal and rollback of a put? So we would be talking insert/remove competition on the same key.<br><br><br>The key lock&#39;s lifecycle is not tied to the entry&#39;s lifecycle, instead it lives just for the duration of a transaction. As soon as the tx is committed/rolled back, the lock is removed, and any tx that was waiting on the lock will have to create its own lock.<br>
</blockquote><br style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">Ah ok so it is a very big problem then. I agree then you need reference counting. You want that lock to stay around for as long as you have contention.</span></blockquote>
<br></div><div>Ok, implemented.  Pls review and comment.</div><div><br></div><div><a href="https://github.com/infinispan/infinispan/pull/1382" target="_blank">https://github.com/infinispan/infinispan/pull/1382</a></div><div>
<br></div><div>Cheers</div><div>Manik</div><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div style="word-wrap:break-word"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani" target="_blank">twitter.com/maniksurtani</a></div><div><br>
</div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid" target="_blank">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></div></div></div><div class="im">_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></div></blockquote></div><br><div class="im"><div>
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani" target="_blank">twitter.com/maniksurtani</a></div><div><br>
</div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid" target="_blank">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></div></div></div><br>_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br></blockquote></div><br>