<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Shaohe,<br>
I have responded in the Etherpad. The Cyborg/Nova scheduling spec
<a moz-do-not-send="true"
href="https://git.openstack.org/cgit/openstack/cyborg/tree/doc/specs/rocky/cyborg-nova-sched.rst?h=refs/changes/17/554717/1#n136">details
the 4 types of user requests</a>. <br>
<br>
I believe you are looking for more details on what the RC names,
traits and flavors will look like. I will add that to the spec
itself.<br>
<br>
Thanks,<br>
Sundar<br>
<br>
<div class="moz-cite-prefix">On 3/28/2018 2:10 AM, 少合冯 wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGV=wNOAvKk9bzAmMSAkTaZUd1OUY1z1sFQvg0_PkLrqsBHY4Q@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">I have summarize some scenarios for fpga devices
request.
<div><a
href="https://etherpad.openstack.org/p/cyborg-fpga-request-scenarios"
moz-do-not-send="true">https://etherpad.openstack.org/p/cyborg-fpga-request-scenarios</a></div>
<div>
<div><br>
</div>
<div>Please add more more
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">scenarios<span> to
find out the exceptions that placement can not satisfy
the filter and weight.</span></span></div>
<div><br>
</div>
<div>IMOH, I refer
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">placement<span>
to do
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">filter
and weight. If we have to let cyborg do <span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">filter
and weight. Nova scheduler just need call cyborg
once for all host
<span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">weight
though we do the weigh one by one.</span></span></span></span></span></div>
<div><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
</span></span></span></span></span></div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2018-03-23 12:27 GMT+08:00 Nadathur,
Sundar <span dir="ltr"><<a
href="mailto:sundar.nadathur@intel.com" target="_blank"
moz-do-not-send="true">sundar.nadathur@intel.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Hi all,<br>
There seems to be a possibility of a race condition in
the Cyborg/Nova flow. Apologies for missing this earlier.
(You can refer to the <a
href="https://review.openstack.org/#/c/554717/1/doc/specs/rocky/cyborg-nova-sched.rst"
target="_blank" moz-do-not-send="true">proposed
Cyborg/Nova spec</a> for details.)<br>
<br>
Consider the scenario where the flavor specifies a
resource class for a device type, and also specifies a
function (e.g. encrypt) in the extra specs. The Nova
scheduler would only track the device type as a resource,
and Cyborg needs to track the availability of functions.
Further, to keep it simple, say all the functions exist
all the time (no reprogramming involved).<br>
<br>
To recap, here is the scheduler flow for this case:<br>
<ul>
<li>A request spec with a flavor comes to Nova
conductor/scheduler. The flavor has a device type as a
resource class, and a function in the extra specs.</li>
<li>Placement API returns the list of RPs (compute
nodes) which contain the requested device types (but
not necessarily the function).</li>
<li>Cyborg will provide a custom filter which queries
Cyborg DB. This needs to check which hosts contain the
needed function, and filter out the rest.</li>
<li>The scheduler selects one node from the filtered
list, and the request goes to the compute node.<br>
</li>
</ul>
For the filter to work, the Cyborg DB needs to maintain a
table with triples of (host, function type, #free units).
The filter checks if a given host has one or more free
units of the requested function type. But, to keep the #
free units up to date, Cyborg on the selected compute node
needs to notify the Cyborg API to decrement the #free
units when an instance is spawned, and to increment them
when resources are released. <br>
<br>
Therein lies the catch: this loop from the compute node to
controller is susceptible to race conditions. For example,
if two simultaneous requests each ask for function A, and
there is only one unit of that available, the Cyborg
filter will approve both, both may land on the same host,
and one will fail. This is because Cyborg on the
controller does not decrement resource usage due to one
request before processing the next request.<br>
<br>
This is similar to <a
href="https://specs.openstack.org/openstack/nova-specs/specs/pike/implemented/placement-claims.html"
target="_blank" moz-do-not-send="true">this previous
Nova scheduling issue</a>. That was solved by having the
scheduler claim a resource in Placement for the selected
node. I don't see an analog for Cyborg, since it would not
know which node is selected. <br>
<br>
Thanks in advance for suggestions and solutions.<br>
<br>
Regards,<br>
Sundar <br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
rel="noreferrer" target="_blank" moz-do-not-send="true">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a
href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>