From: Jason Gunthorpe <jgg@mellanox.com>
To: Andrew Boyer <aboyer@pensando.io>, Yishai Hadas <yishaih@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>, linux-rdma@vger.kernel.org
Subject: Re: Lockless behavior for CQs in userspace
Date: Tue, 17 Mar 2020 16:51:53 -0300 [thread overview]
Message-ID: <20200317195153.GX20941@ziepe.ca> (raw)
In-Reply-To: <F97A8269-872F-4B94-8F03-7A8E26AE0952@pensando.io>
On Tue, Mar 17, 2020 at 11:10:15AM -0400, Andrew Boyer wrote:
>
> > On Mar 17, 2020, at 11:00 AM, Leon Romanovsky <leonro@mellanox.com> wrote:
> >
> > On Tue, Mar 17, 2020 at 10:45:08AM -0400, Andrew Boyer wrote:
> >> Hello Leon,
> >> I understand that we are not to create new providers that use environment variables to control locking behavior. The ‘new’ way to do it is to use thread domains and parent domains.
> >>
> >> However, even mlx5 still uses the env var exclusively to control lockless behavior for CQs. Do you have anything in mind for how to extend thread_domains or some other part of the API to cover the CQ case?
> >
> > Which parameter did you have in mind?
> > I would say that all those parameters are coming from pre-rdma-core era.
> >
> > Doesn't this commit do what you are asking?
> > https://github.com/linux-rdma/rdma-core/commit/0dbde57c59d2983e848c3dbd9ae93eaf8e7b9405
> >
> > Thanks
> >
> >>
> >> Thank you,
> >> Andrew
> >>
>
> You are right - I got thrown off by this:
>
> > if (mlx5_spinlock_init(&cq->lock, !mlx5_single_threaded))
> > goto err;
>
> If IBV_CREATE_CQ_ATTR_SINGLE_THREADED is set, it passes an argument
> to the polling function to skip the lock calls entirely. So it
> doesn’t matter that they are still enabled internally.
Hmm, a thread domain should probably force
IBV_CREATE_CQ_ATTR_SINGLE_THREADED during greation with the new API..
Yishai?
Jason
next prev parent reply other threads:[~2020-03-17 19:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 14:45 Lockless behavior for CQs in userspace Andrew Boyer
2020-03-17 15:00 ` Leon Romanovsky
2020-03-17 15:10 ` Andrew Boyer
2020-03-17 19:51 ` Jason Gunthorpe [this message]
2020-03-18 7:52 ` Yishai Hadas
2020-03-18 8:03 ` Leon Romanovsky
2020-03-18 8:15 ` Yishai Hadas
2020-03-18 11:43 ` Jason Gunthorpe
2020-03-18 12:36 ` Yishai Hadas
2020-03-18 12:45 ` 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=20200317195153.GX20941@ziepe.ca \
--to=jgg@mellanox.com \
--cc=aboyer@pensando.io \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=yishaih@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).