<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Sean</p>
<p><br>
</p>
<p>Interesting thanks.</p>
<p>I tried an experiment. Create a scalable endpoint, but only one rx context. Use a single thread that uses this rx context. It works. Once I increase the number of threads past one, then I have the probllem that if (say) tagged recvs are posted such a that
 0,4,8,12 are on ctx0, 1,5,9,13 are on ctx1, 2,6,10,14 are on ctx2 and so on, then I start missing receives. Clearly some receives are going onto contexts that are listening for something else. This would seem to make the shareable receive contexts basically
 useless for my use case.</p>
<p><br>
</p>
<p>The problem I had before was that I am creating N contexts based on the number of threads I plan on using, but only posting receives to a subset of them initially, the cqs of the unused ones were probably being filled before the ones I was using and hence
 I did not see the first receives ...</p>
<p><br>
</p>
<p>Question : What is the expected use case of shared receive contexts? If I can't use them one per thread (at least for tagged messages), then when would I use them. If I had only unexpected messages, then one per thread might work, but you'd need to be very
 carefully to ensure all threads were polling right up to the end, otherwise some rx's might end up on cq's that were idle ...</p>
<p><br>
</p>
<p>Thanks as usual for info. (It troubles me a bit that there's only one of you who actually knows all this stuff ...)</p>
<p><br>
</p>
<p>JB</p>
<p><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Libfabric-users <libfabric-users-bounces@lists.openfabrics.org> on behalf of Hefty, Sean <sean.hefty@intel.com><br>
<b>Sent:</b> 09 December 2021 22:37:06<br>
<b>To:</b> Biddiscombe, John A.; libfabric-users@lists.openfabrics.org<br>
<b>Subject:</b> Re: [libfabric-users] Scalable endopint issue</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">> When receiving, suppose I have two Rx contexts and I post a receive on both and a<br>
> message arrives - if they are tagged messages, then presumably whichever Rx has the<br>
> right tag will receive it - if untagged, is it just round robiin, or chance/race to see<br>
> which cq is given the receive?<br>
<br>
If the provider has not exposed some sort of steering flow mechanism (provider specific definition), then the Rx context that receives a message is non-deterministic from the viewpoint of the app.  You're at the whim of the provider implementation, and it could
 also depend on traffic from other peers targeting the same endpoint.  E.g. round robin at the receiver may not look like round robin at the sender.<br>
<br>
This is true even for tagged messages.  The Rx contexts are independent, and if a tagged message is received on one, but the matching tag was posted to another, then the message will be treated as unexpected.<br>
<br>
Named Rx contexts are defined for sender directed traffic.<br>
<br>
- Sean<br>
_______________________________________________<br>
Libfabric-users mailing list<br>
Libfabric-users@lists.openfabrics.org<br>
<a href="https://lists.openfabrics.org/mailman/listinfo/libfabric-users">https://lists.openfabrics.org/mailman/listinfo/libfabric-users</a><br>
</div>
</span></font>
</body>
</html>