From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Alex Rosenbaum <rosenbaumalex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"Alex @ Mellanox" <Alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH RFC rdma-core] Verbs: Introduce resource domain
Date: Wed, 20 Sep 2017 19:41:46 -0600 [thread overview]
Message-ID: <20170921014146.GA4041@obsidianresearch.com> (raw)
In-Reply-To: <CAFgAxU9M0MXw371Nh2tviuQHXCJxnFLPtaAcsevigEMMWjUPhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, Sep 19, 2017 at 05:05:11PM +0300, Alex Rosenbaum wrote:
> On Mon, Sep 18, 2017 at 11:54 PM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 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.
Well, CQ could gain a PD parameter, so that isn't a big deal..
> 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.
This is a bigger problem, but it could be solved, if not a bit messy..
Your concept patch requires adding a new input to every single object
creation function, this is a pretty big API change..
On the other hand, the PD is already an input to almost all of the
required creation functions so it much less API churn.
But, as you say, you'd have to solve the MR sharing problem at least
to make PD workable. Perhaps some kind of 'child' PD that was only for
threading..
> >> 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.
That goes both ways, a single 'max' does not make sense if there are
multiple different sorts of objects being controlled (eg UAR and
something else). It only works well in your context of having a single
constrained UAR.
Probably the better option is to introduce something like a 'struct
verbs_locking_domain *' input which is a proper object and can have a
range of operators.
I would say each creating locking domain objects is just strided
across the various limited resouces in the device.
'dv' accessors, eg mlxdv_set_locking_uar() can be provided to directly
assign specific limited resources under the control of the
application. 'dv' query functions can be used to directly learn the
specific limits for each specific thing.
This way we don't have to revisit things. This would also be a good
place to centralize all the crazy no threading flags we have
accumulated in various places and ways (including the stupid
environment variables). a 'struct verbs_locking_domain' option that
switches off all internal locking would make sense too.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-09-21 1:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 11:48 [PATCH RFC rdma-core] Verbs: Introduce resource domain Yishai Hadas
[not found] ` <1505648922-21346-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-09-18 20:54 ` Jason Gunthorpe
[not found] ` <20170918205411.GB7059-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-09-19 14:05 ` Alex Rosenbaum
[not found] ` <CAFgAxU9M0MXw371Nh2tviuQHXCJxnFLPtaAcsevigEMMWjUPhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-21 1:41 ` Jason Gunthorpe [this message]
[not found] ` <20170921014146.GA4041-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-09-26 9:09 ` Alex Rosenbaum
[not found] ` <CAFgAxU-FPTNM99iTACmw5yeW1zyv+7g+KC2jigj4DXiervyjdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-30 15:59 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170921014146.GA4041@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=Alexr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=rosenbaumalex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox