-
Notifications
You must be signed in to change notification settings - Fork 56
Find a way to track struct rpma_conn
from which the struct rpma_completion
comes from
#977
Comments
Hello. I have a question. The Back to the question. I think the second approach would be more suitable because it's convenient for API users. |
In general, a QP can have two CQs (for send completions and recv completions). These CQs can be a single CQ (as it is currently in librpma) or two separate CQs (#737). Each of these CQs might be connected to one or more connections at will. SRQ is a feature that allows sharing RQ (part of QP) between QPs. Having a shared RQ makes sharing a recv CQ between connections potentially a very common use-case. I think this is why
I do not like the second idea (allow getting directly struct rpma_conn related to a particular struct rpma_completion) for exactly the same reason I have voted against the internal SRQ table maintained by the librpma library (#737 (comment)). It has to be MT-safe and very efficient since processing completions is the performance-critical path. Whereas MT-safety does not go well with efficiency. As of now, I think the application is better equipped to address this issue in an optimal way. |
Thanks for explanation. Does this mean we firstly need to make sure the
But the first approach also needs a data structure such as hashtable to build relationship between |
It is very important information for this discussion. :-)
No. It is not. You can imagine an application having few connections and looking for a connection might be a lot simpler using e.g. a table or set of comparisons if the number of connections is known upfront. |
After reading the implementation of
If the last argument is
The lazy mode is introduced in this patch. I haven't understood it completely but it seems |
You are right that the MLX implementation of the The Ref: https://manpages.debian.org/stretch/libibverbs-dev/ibv_create_cq_ex.3.en.html TL;DR: Don't worry about it. |
Hi @janekmi How about the following design:
Note: let applications compare two qp_num by themselves. |
1) add new rpma_conn_get_qp_num() to query the connection's unique ID. 2) add unit tests for the rpma_conn_get_qp_num(). Ref: pmem#977 Signed-off-by: Xiao Yang <[email protected]>
1) add rpma_conn_get_qp_num() to query the connection's unique ID. 2) add unit tests for the rpma_conn_get_qp_num(). Ref: pmem#977 Signed-off-by: Xiao Yang <[email protected]>
Resolved by #1087 |
Having an SRQ on its way (#958 #685 #783 #737) we are close to a situation when it will be no longer obvious from which
struct rpma_conn
a particularstruct rpma_completion
comes from. It will be handy to allow tracking it down.struct ibv_wc
has a field nameduint32_t qp_num
which allegedly is:Indeed,
struct ibv_qp
also has the same field which is:Roughly speaking we can imagine two possible ways of solving this issue:
uint32_t qp_num
value forstruct rpma_conn
andstruct rpma_completion
which will allow the end-user to match these two entities orstruct rpma_conn
related to a particularstruct rpma_completion
Let's discuss this fascinating issue. :-)
Ref: https://www.rdmamojo.com/2013/02/15/ibv_poll_cq/
Ref: https://www.rdmamojo.com/2012/12/21/ibv_create_qp/
The text was updated successfully, but these errors were encountered: