On Mon, Sep 18, 2017 at 11:54 PM, Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote: > On Sun, Sep 17, 2017 at 02:48:42PM +0300, Yishai Hadas wrote: > >> Resource domain represents a collection of IB resources (as of QP, CQ, >> etc.) which are accessed by an application from the same context (e.g. >> same thread) and as such can share hardware and software resources to >> allow smarter management of resources by the provider library and better >> performance. > > This sounds exactly like a PD to me. Why do we need another construct? > What is wrong with a 'thread-unsafe' flag during PD creation and then > contain the shared resources in the PD? PD does not fit good enough. It is does not cover CQ's in allocation flow, but limited to QP's, SRQ's, WQ's. Also, using multiple PD's will require to use a dedicated MR per PD, instead of sharing a single MR for the entire memory used over multiple threads / QP's. > >> uint32_t raw_packet_caps; /* Use ibv_raw_packet_caps */ >> + uint32_t max_resource_domains; > > Even with this approach, not sure a max makes much sense, this value should > just be hashed into whatever range the provider has on a resource by > resource basis. By exposing the max_resource_domains we allow the application to take the decision of which element will get hurt if it reaches that limit. If we leave the logic hidden inside the libraries, the application losses control over the best performance vs average better performance. Alex -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html