<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Nadathur, Sundar <<a href="mailto:sundar.nadathur@intel.com">sundar.nadathur@intel.com</a>> 于2019年4月25日周四 下午5:59写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-7977367244242840703WordSection1">
<p class="MsoNormal"><b>From:</b> Alex Xu <<a href="mailto:soulxu@gmail.com" target="_blank">soulxu@gmail.com</a>> <br>
<b>Sent:</b> Monday, April 15, 2019 4:50 PM<u></u><u></u></p>
<p class="MsoNormal">> The cyborg only needs to return un-numbered request group, then Nova will<br>
> base on all the 'hw:xxx' extra specs and 'accel:device_profile.[numa node<br>
> id]' to generate a placement request like above.<br>
<br>
<u></u><u></u></p>
<p class="MsoNormal">I am not quite following the idea(s) proposed here. Cyborg returns only the device-related request groups. The un-numbered request group in the flavor is not touched by Cyborg.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Secondly, if you use the ‘accel:’ stuff in the flavor to decide NUMA affinity, how will you pass that to Placement? This thread is about the syntax of the GET /a-c call.</p></div></div></blockquote><div><br></div><div>The point at here is about we need some way to enable cyborg tell nova that the device will attach to which guest numa node. I don't think we should code the device guest numa affinity info in the request group which Cyborg returned. The nova's flavor is the one tell that, and pass to the affinity requirement to the GET /a-c call.</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"><div lang="EN-US"><div class="gmail-m_-7977367244242840703WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><br>
> For example, if it is PCI device under first numa node, the extra spec will<br>
> be 'accel:device_profile.0=<profile_name>' the cyborg can return a simple<br>
> request 'resources=CYBORG_PCI_XX_DEVICE:1', then we merge this into the<br>
> request group 'resources1=VCPU:2,MEMORY_MB:128,CYBORG_PCI_XX_DEVICE:1'. If<br>
> the pci device has a special trait, then cyborg should return request group<br>
> as 'resources1=CYBORG_PCI_XX_DEVICE:1&required=SOME_TRAIT', then nova merge<br>
> this into placement request as 'resources1.1'.<br>
<br>
<u></u><u></u></p>
<p class="MsoNormal">Sorry, I don’t follow this either. The request groups have entries like ‘resources:CUSTOM_FOO=1’, not 'resources=CYBORG_PCI_XX_DEVICE:1'. So, I don’t see where to stick the NUMA node #.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Anyways, for Cyborg, it seems to me that there is a fairly straightforward scheme to address NUMA affinity: annotate the device’s nested RP with a trait indicating which NUMA node it belongs to (e.g. CUSTOM_NUMA_NODE_0), and use that to
 guide scheduling. This should be a valid use of traits because it expresses a property of the resource provider and is used for scheduling (only).</p></div></div></blockquote><div><br></div><div>I don't like the way of using trait to mark out the NUMA node.</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"><div lang="EN-US"><div class="gmail-m_-7977367244242840703WordSection1"><p class="MsoNormal">
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As for how the annotation is done, it could be automated. The operator’s tool that configures a device to affinitize with a NUMA node (by setting MSI-X vectors, etc.) also invokes a Cyborg API (yet to be written) with the NUMA node # --
 that would identify the device RP and update Placement with that trait. The tool needs to ensure that the device has been discovered by Cyborg and updated in Placement before invoking the API.</p></div></div></blockquote><div><br></div><div>What I'm talking about at here is about the virtual device attach to which guest numa node. It isn't about the a physical device affinity to which host numa node.</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"><div lang="EN-US"><div class="gmail-m_-7977367244242840703WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal">Sundar<a name="m_-7977367244242840703______replyseparator"></a><u></u><u></u></p>
</div>
</div>

</blockquote></div></div>