<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 21, 2021 at 1:09 PM Daniel P. Berrangé <<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Apr 21, 2021 at 12:53:49PM +0200, Roman Mohr wrote:<br>
> Hi,<br>
> <br>
> I have a question regarding enabling l3 cache emulation on Domains. Can<br>
> this also be enabled without cpu-pinning, or does it need cpu pinning to<br>
> emulate the l3 caches according to the cpus where the guest is pinned to?<br>
<br>
I presume you're referring to<br>
<br>
  <cpu><br>
    <cache level='3' mode='emulate|passthrough|none'/><br>
  </cpu><br></blockquote><div><br></div><div>Exactly.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
There is no hard restriction placed on usage of these modes by QEMU.<br>
<br>
Conceptually though, you only want to use "passthrough" mode if you<br>
have configured the sockets/cores/threads topology to match the host<br>
CPUs. In turn you only ever want to set sockets/cores/threads to<br>
match the host if you have done CPU pinning such that the topology<br>
actually matches the host CPUs that have been pinned to.<br>
<br>
As a rule of thumb<br>
<br>
 - If letting CPUs float<br>
<br>
     -> Always uses sockets=1, cores=num-vCPUs, threads=1<br>
     -> cache==emulate<br>
     -> Always use 1 guest NUMA node (ie the default)<br>
<br>
<br>
 - If strictly pinning CPUs 1:1<br>
<br>
     -> Use sockets=N, cores=M, threads=0 to match the topology<br>
        of the CPUs that have been pinned to<br>
     -> cache==passthrough<br>
     -> Configure virtual NUMA nodes if the CPU pinning or guest<br>
        RAM needs cross host NUMA nodes.<br>
<br>
<br></blockquote><div><br></div><div>Thanks, that answers my questions.</div><div><br></div><div>Best regards,</div><div>Roman</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Daniel<br>
-- <br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dberrange</a> :|<br>
<br>
</blockquote></div></div>