<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
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://arxiv.org/pdf/1810.05600" 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"><img style="width:228px;filter:brightness(0.97);height:295px;" width="228" height="295" draggable="false" class="lp-rich-link-mediaImage" alt="preview.png" src="cid:C27B5F08-87CE-4FF0-B4A5-9EC1CFDF99FD"></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://arxiv.org/pdf/1810.05600" style="text-decoration: none" draggable="false"><font color="#272727" style="color: rgba(0, 0, 0, 0.847059);">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://arxiv.org/pdf/1810.05600" style="text-decoration: none" draggable="false"><font color="#808080" style="color: rgba(0, 0, 0, 0.498039);">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>
</body>
</html>