<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Sounds interesting. I would think you need a bit more context than a simple lock can provide - when in the presence of a thread of execution that accesses multiple locks. </div><div dir="ltr"><br></div><div dir="ltr">I can’t read the paper at the moment but will for sure!</div><div dir="ltr"><br><blockquote type="cite">On Sep 5, 2024, at 12:13 PM, Dave Dice <dave.dice@oracle.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Sep 5, 2024, at 1:06 PM, robert engels <robaho@icloud.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="auto">
<div dir="ltr"></div>
<div dir="ltr">I think to get optimum performance in most cases you need to be able to control the core affinity based on X. It seems a custom scheduler would be a very cool way to address this. </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>For the compact NUMA-aware locks approach we decided to tolerate whatever the ambient placement happened to be, and just shift the order of admission.   This worked well for our purposes and was relatively non-invasive, and didn’t suborn any of the existing
 placement or affinity policies.  </div>
<div><br>
</div>
<div>Regards</div>
<div>Dave</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div>
<div dir="auto">
<div dir="ltr"><br>
<blockquote type="cite">On Sep 5, 2024, at 11:50 AM, Dave Dice <dave.dice@oracle.com> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr"> It’s possible some of the work done in Oracle Labs on NUMA-aware locks might be applicable in this context.  Briefly,  we reorder the list of threads waiting on a lock to prefer “near” handovers in the short-term, but still preserve long-term
 fairness.   Most of the keys ideas map cleanly over to schedulers.   The paper appeared in EuroSys 2019, but the link below is to the non-paywalled arXiv version.    Some of the things we needed to do — making all the operations constant-time, and dealing
 with concurrent arriving threads, lock-free list manipulation — could likely be relaxed in the context of user-level scheduling.
<div><br>
</div>
<div>Regards</div>
<div>Dave<br>
<div><br>
</div>
<div><br>
<div><br>
</div>
<div>
<div style="display: block;">
<div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://arxiv.org/pdf/1810.05600">
<a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:228px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://urldefense.com/v3/__https://arxiv.org/pdf/1810.05600__;!!ACWV5N9M2RV99hQ!NeULV5CzX1E8068n9zdQEghQSSOvEvhP0EsEW6-Wb12OJ_98OTu1GB_29u7C3jEs5GlVpeZMBpK81co$" dir="ltr" role="button" draggable="false" width="228">
<table style="table-layout:fixed;border-collapse:collapse;width:228px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="228">
<tbody>
<tr>
<td vertical-align="center" align="center">
<div><preview.png></div>
</td>
</tr>
<tr>
<td vertical-align="center">
<table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="228" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);" class="lp-rich-link-captionBar">
<tbody>
<tr>
<td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem">
<div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack">
<div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading">
<a rel="nofollow" href="https://urldefense.com/v3/__https://arxiv.org/pdf/1810.05600__;!!ACWV5N9M2RV99hQ!NeULV5CzX1E8068n9zdQEghQSSOvEvhP0EsEW6-Wb12OJ_98OTu1GB_29u7C3jEs5GlVpeZMBpK81co$" style="text-decoration: none" draggable="false"><font color="#272727" style="">1810</font></a></div>
<div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading">
<a rel="nofollow" href="https://urldefense.com/v3/__https://arxiv.org/pdf/1810.05600__;!!ACWV5N9M2RV99hQ!NeULV5CzX1E8068n9zdQEghQSSOvEvhP0EsEW6-Wb12OJ_98OTu1GB_29u7C3jEs5GlVpeZMBpK81co$" style="text-decoration: none" draggable="false"><font color="#808080" style="">PDF
 Document · 1.3 MB</font></a></div>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
</div>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Sep 5, 2024, at 12:16 PM, Francesco Nigro <nigro.fra@gmail.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="ltr">Hi <a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:dannyt@netflix.com" tabindex="-1">@Danny Thomas</a> 
<div><br>
</div>
<div>We're working (nudge nudge Andrew Haley) on a custom scheduler API - as mentioned by Alan, which enables (expert) users/framework devs to implement something like this - and more :)</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Franz</div>
</div>
<div dir="ltr">
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il giorno lun 2 set 2024 alle ore 10:41 Alan Bateman <<a href="mailto:alan.bateman@oracle.com" target="_blank">alan.bateman@oracle.com</a>> ha scritto:<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 02/09/2024 07:23, Danny Thomas wrote:<br>
> Hi folks,<br>
><br>
> I was giving some thought to our adoption of Xen 4 coinciding with <br>
> virtual threads being available, and it occurred to me with an <br>
> increasing number of architectures clustering L3 and L2 caches between <br>
> groups of cores on a die, that virtual threads scheduling in user <br>
> space could make them particularly well suited to these architectures, <br>
> if the scheduler were topology aware.<br>
><br>
> Have you given any thought to worker CPU affinity and/or locality to <br>
> an existing worker when a virtual thread is started by another? Would <br>
> you consider this something to be proved out by custom schedulers, or <br>
> is this enough of a trend to justify future investment in the default <br>
> scheduler?<br>
<br>
To date, we've put CPU and node affinity into the "custom scheduler" <br>
topic, which is still TBD on whether to expose. If you have data from <br>
any experiments with the current EA builds then it would be useful to <br>
see. The current EA builds allow the the default FJP based scheduler to <br>
be replaced for experimentation purposes.<br>
<br>
In a system with a mix of schedulers then starting a virtual thread will <br>
"inherit" the scheduler when not configured. That seems a sensible default.<br>
<br>
-Alan<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>


</div></blockquote></body></html>