<div>
                    hi Martin
                </div><div><br></div><div>It’s really nice of you to help reviewing the mass code. Thanks.</div><div><br></div><div>I don’t find a better way to split patch.</div>
                <div></div>
                 
                <p style="color: #A0A0A8;">On Wednesday, 21 June 2017 at 9:53 PM, Martin Kletzander wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>On Mon, Jun 12, 2017 at 05:48:40PM +0800, Eli Qiao wrote:</div><blockquote type="cite"><div><div>This patch adds new xml element to support cache tune as:</div><div><br></div><div><cputune></div><div> ...</div><div> <cachetune id='0' cache_id='0' level='3' type='both' size='2816' unit='KiB'</div><div> vcpus='1,2'/></div></div></blockquote><div><br></div><div>The cache_id automatically implies level and type.  Either have one or</div><div>the other.  I know we talked about this already (maybe multiple times),</div><div>but without any clear outcome.  For me the sensible thing is to have</div><div>level and type as that doesn't need to be changed when moving between</div><div>hosts, and if it cannot be migrated, then it's properly checked.</div><div><br></div></div></div></span></blockquote><div>Think about this case, if the VM has numa setting, the VM has multiple vcpu</div><div>running across sockets, if we don’t specify cache_id (cache id stand for</div><div>on which Socket/Cache), how can we know on which Socket we allocation for the VM?</div><div><br></div><div>I can image there’s 2 cases:</div><div><br></div><div>1. if we don’t specify vcpus, and our host have 2 or more Socket, we have this xml define</div><div><br></div><div> <cachetune id='0' level='3' type='both' size='2816' unit=‘KiB’></div><div><br></div><div>We allocate 2816 KiB cache on all of the Socket/Cache.</div><div><br></div><div>2. if we specify vcpus</div><div><div> <cachetune id='0' level='3' type='both' size='2816' unit=‘KiB’, vcpus=‘1,2'></div></div><div> <cachetune id=‘1' level='3' type='both' size=‘5632' unit=‘KiB’, vcpus=‘3,4’></div><div><br></div><div>We need to make sure we vcpu 1, 2 are mapped to Socket/Cache 0 and 3,4 on Socket/Cache 1.</div><div>So that vcpus running on Socket/Cache 0 has 2816 KiB cache allocated and vcpus running on</div><div>Socket/Cache 1 has 5632 KiB cache allocated.</div><div><br></div><div>Does it make sense?</div><div> </div><div>…</div><div><br></div><div><br></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"><span><div></div><blockquote type="cite"><div><div><br></div><div>    virDomainCputune cputune;</div><div><br></div><div>+    virDomainCachetune cachetune;</div><div>+</div></div></blockquote><div><br></div><div>It is part of cputune in the XML, why not here?</div></span></blockquote><div><br></div><div>Oh yes, I will rethink how to simple the domain cache tune. </div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"><span><div><div><div><br></div><blockquote type="cite"><div><div>    virDomainNumaPtr numa;</div><div>    virDomainResourceDefPtr resource;</div><div>    virDomainIdMapDef idmap;</div><div>--</div><div>1.9.1</div><div><br></div><div>--</div><div>libvir-list mailing list</div><div><a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a></div><div><a href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></div></div></blockquote></div><div><div>--</div><div>libvir-list mailing list</div><div><a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a></div><div><a href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>