From: Jason Gunthorpe <jgg@mellanox.com>
To: Max Gurtovoy <maxg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de,
loberman@redhat.com, bvanassche@acm.org,
linux-rdma@vger.kernel.org, kbusch@kernel.org,
dledford@redhat.com, idanb@mellanox.com, shlomin@mellanox.com,
oren@mellanox.com, vladimirk@mellanox.com
Subject: Re: [PATCH 1/5] IB/core: add a simple SRQ set per PD
Date: Tue, 17 Mar 2020 15:43:38 -0300 [thread overview]
Message-ID: <20200317184338.GY13183@mellanox.com> (raw)
In-Reply-To: <290500dc-7a89-2326-2abf-1ab9f613162e@mellanox.com>
On Tue, Mar 17, 2020 at 08:24:30PM +0200, Max Gurtovoy wrote:
>
> On 3/17/2020 8:10 PM, Jason Gunthorpe wrote:
> > On Tue, Mar 17, 2020 at 06:37:57PM +0200, Max Gurtovoy wrote:
> >
> > > > > +#include <rdma/ib_verbs.h>
> > > > > +
> > > > > +struct ib_srq *rdma_srq_get(struct ib_pd *pd);
> > > > > +void rdma_srq_put(struct ib_pd *pd, struct ib_srq *srq);
> > > > At the end, it is not get/put semantics but more add/remove.
> > > srq = rdma_srq_add ?
> > >
> > > rdma_srq_remove(pd, srq) ?
> > >
> > > Doesn't seems right to me.
> > >
> > > Lets make it simple. For asking a SRQ from the PD set lets use rdma_srq_get
> > > and returning to we'll use rdma_srq_put.
> > Is there reference couting here? get/put should be restricted to
> > refcounting APIs, IMHO.
>
> I've added a counter (pd->srqs_used) that Leon asked to remove .
>
> There is no call to kref get/put here.
I didn't look closely, any kind of refcount scheme is reasonable, but
if add is supposed to create a new srq then that isn't 'get'..
> Do you prefer that I'll change it to be array in PD: "struct
> ib_srq **srqs;" ?
Not particularly..
It actually feels a bit weird, should there be some numa-ness involved
here so that the SRQ with memory on the node that is going to be
polling it is returned?
> And update ib_alloc_pd API to get pd_attrs and allocate the array during PD
> allocation ?
The API is a bit more composable if things can can be done as
following function calls are done that way.. I don't like the giant
multiplexor structs in general
Jason
next prev parent reply other threads:[~2020-03-17 18:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 13:40 [PATCH 0/5] nvmet-rdma/srpt: SRQ per completion vector Max Gurtovoy
2020-03-17 13:40 ` [PATCH 1/5] IB/core: add a simple SRQ set per PD Max Gurtovoy
2020-03-17 13:55 ` Leon Romanovsky
2020-03-17 16:37 ` Max Gurtovoy
2020-03-17 18:10 ` Jason Gunthorpe
2020-03-17 18:24 ` Max Gurtovoy
2020-03-17 18:43 ` Jason Gunthorpe [this message]
2020-03-17 21:56 ` Max Gurtovoy
2020-03-17 19:54 ` Leon Romanovsky
2020-03-18 6:47 ` Leon Romanovsky
2020-03-18 9:46 ` Max Gurtovoy
2020-03-18 10:29 ` Leon Romanovsky
2020-03-18 10:39 ` Max Gurtovoy
2020-03-18 10:46 ` Leon Romanovsky
2020-03-17 13:40 ` [PATCH 2/5] nvmet-rdma: add srq pointer to rdma_cmd Max Gurtovoy
2020-03-17 13:40 ` [PATCH 3/5] nvmet-rdma: use SRQ per completion vector Max Gurtovoy
2020-03-18 6:53 ` Leon Romanovsky
2020-03-18 9:39 ` Max Gurtovoy
2020-03-17 13:40 ` [PATCH 4/5] IB/core: cache the CQ " Max Gurtovoy
2020-03-17 15:19 ` Chuck Lever
2020-03-17 15:41 ` Max Gurtovoy
2020-03-17 20:36 ` Chuck Lever
2020-03-17 22:18 ` Max Gurtovoy
2020-03-17 22:50 ` Bart Van Assche
2020-03-17 23:26 ` Max Gurtovoy
2020-03-17 13:40 ` [PATCH 5/5] RDMA/srpt: use SRQ per " Max Gurtovoy
2020-03-17 13:58 ` Leon Romanovsky
2020-03-17 16:43 ` Max Gurtovoy
2020-03-17 19:58 ` Leon Romanovsky
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=20200317184338.GY13183@mellanox.com \
--to=jgg@mellanox.com \
--cc=bvanassche@acm.org \
--cc=dledford@redhat.com \
--cc=hch@lst.de \
--cc=idanb@mellanox.com \
--cc=kbusch@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=maxg@mellanox.com \
--cc=oren@mellanox.com \
--cc=sagi@grimberg.me \
--cc=shlomin@mellanox.com \
--cc=vladimirk@mellanox.com \
/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;
as well as URLs for NNTP newsgroup(s).