<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">While I am trying to figure out, all what you people are saying, :-p.<div><br></div><div>I would like to know, if it would be beneficial, in anyway, to take this direction. As for my project, I am looking forward to implementation in lguest, but I would like to extend the project to KVM too.</div>
</span><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 8:58 PM, Dan Magenheimer <span dir="ltr">&lt;<a href="mailto:dan.magenheimer@oracle.com">dan.magenheimer@oracle.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; From: Nitin Gupta [mailto:<a href="mailto:ngupta@vflare.org">ngupta@vflare.org</a>]<br>
&gt;<br>
</div><div class="im">&gt; On Tue, Feb 9, 2010 at 4:49 AM, Dan Magenheimer<br>
&gt; &lt;<a href="mailto:dan.magenheimer@oracle.com">dan.magenheimer@oracle.com</a>&gt; wrote:<br>
&gt; &gt;&gt; However, I could not understand your coherence issue: this vswap<br>
&gt; &gt;&gt; driver simply sends swap page to hypervisor synchronously.<br>
&gt; &gt;<br>
&gt; &gt; I am asking if anything in the virtio &quot;layer&quot; buffers<br>
&gt; &gt; the data, making it appear to the client that the data<br>
&gt; &gt; has been copied from/to the hypervisor (and all of tmem&#39;s<br>
&gt; &gt; data structures updated in the hypervisor) but it really<br>
&gt; &gt; hasn&#39;t happened yet. If so, bad things can happen.<br>
&gt; &gt;<br>
&gt;<br>
&gt; I think we can set &quot;virtqueue&quot; size to 1 *and* make it work<br>
&gt; synchronously (this is what vswap does). This should avoid<br>
&gt; any buffering problem you are concerned with.<br>
<br>
</div>Excellent!<br>
<div class="im"><br>
&gt; On a side note, I think such simplistic behavior can result<br>
&gt; in poor performance but handling swapping case always<br>
&gt; brings surprises so maybe anything fancier -- multiple queues<br>
&gt; having large sizes, working asynchronously -- may be difficult<br>
&gt; to implement.<br>
<br>
</div>The tmem implementation in Xen has good concurrency<br>
support, so multiple processors swapping to different<br>
places in the same &quot;swaptype&quot; can proceed concurrently<br>
if this is desired.<br>
<br>
See &quot;Swizzling&quot; in the tmem 2.6.32 patch... up to<br>
16 guest vcpus can be swapping simultaneously to<br>
frontswap.<br>
<br>
So I think for swapping (at least in Linux) there might be more<br>
flexibility for asynchronicity but I don&#39;t think that<br>
applies to cleancache.<br>
<font color="#888888"><br>
Dan<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Gaurav Kukreja<br><br>+91 997 030 1257<br><br>