From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Walukiewicz,
Miroslaw"
<Miroslaw.Walukiewicz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>,
Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
"Hefty,
Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: ibv_post_send/recv kernel path optimizations
Date: Tue, 14 Dec 2010 11:17:35 -0700 [thread overview]
Message-ID: <20101214181735.GA2506@obsidianresearch.com> (raw)
In-Reply-To: <BE2BFE91933D1B4089447C644860408066ABCF66-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
On Tue, Dec 14, 2010 at 02:12:56PM +0000, Walukiewicz, Miroslaw wrote:
> Or,
>
> I looked into shared page approach of passing post_send/post_recv
> info. I still have some concerns.
>
> The shared page must be allocated per QP and there should be a
> common way to allocate such page for each driver.
Why must it be common?
Aren't these pages just hidden away in your driver library or is
something visible to the app? I get that they are somehow used to
insert/remove the extra header information that the hardware cannot
stuff, but how?
> As Jason and Roland said, the best way to pass this parameter
> through mmap is offset. There is no common way how the Offset is
> used per driver and it is driver specific parameter.
Right, offset is driver specific, it is only used between your
userspace driver library and your kernel driver. You can define
whatever you want.
So use something like QPN*4096 + 1
> The next problem is how many shared pages should driver allocate to
> share with user-space. They should contain place for each posted
> buffer by application. It is a big concern to post_recv where large
> number of buffers are posted. Current implementation has no such
> limit.
I don't see the problem. mmap also has a length argument. So
mmap(0,16*4096,PROT_READ|PROT_WRITE,MAP_SHARED,fd,QPN*4096+1)
Means map 16 pages associated with QPN. You don't have to have the
offset and length 'make sense' they are just parameters.
> Even the common offset definition would be defined and accepted, the
> shared page must be stored in ib_qp structure. When a post_send is
You don't need a common definition, it is driver specific.
> called for many QPs, there is a single entry point to
> ib_uverbs_post_send using write to /dev/infiniband/uverbsX. In that
> case there is a lookup to QP store (idr_read_qp) necessary to find a
> correct ibv_qp Structure, what is a big time consumer on the path.
I don't think this should be such a big problem. The simplest solution
would be to front the idr_read_qp with a small learning hashing table.
If you have only one active QP per verbs instance then you avoid the
idr calls. I'm guessing your raw ethernet app uses one QP?
> The NES IMA kernel path also has such QP lookup but the QP number
> format is designed to make such lookup very quickly. The QP numbers
> in OFED are not defined so generic lookup functions like
> idr_read_qp() must be use.
Maybe look at moving the QPN to ibv_qp translation into the driver
then - or better yet, move allocation out of the driver, if Mellanox
could change their FW.. You are right that we could do this much
faster if the QPN was structured in some way
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:[~2010-12-14 18:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 7:16 [patch] infiniband: uverbs: limit the number of entries Dan Carpenter
2010-10-07 16:16 ` Jason Gunthorpe
[not found] ` <20101007161649.GD21206-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-07 16:59 ` Dan Carpenter
2010-10-08 7:59 ` Nicolas Palix
[not found] ` <AANLkTin5zou2JHsdDyhGESuxyPonOs3kLo9Th0vg-kd8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-08 14:25 ` [patch v2] " Dan Carpenter
2010-10-09 23:16 ` [patch] " Jason Gunthorpe
[not found] ` <20101009231607.GA24649-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-12 11:31 ` [patch v3] infiniband: uverbs: handle large " Dan Carpenter
2010-10-12 21:01 ` Jason Gunthorpe
[not found] ` <20101012210118.GR24268-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-10-13 9:05 ` Dan Carpenter
2010-10-13 9:13 ` [patch v4] " Dan Carpenter
2010-11-23 7:10 ` Dan Carpenter
2010-11-24 22:07 ` Roland Dreier
[not found] ` <adahbf6gytv.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-24 22:18 ` Jason Gunthorpe
[not found] ` <20101124221845.GH2369-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-11-25 4:05 ` Roland Dreier
[not found] ` <adad3pugi90.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-11-25 4:13 ` Jason Gunthorpe
[not found] ` <20101125041337.GA11049-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-11-25 15:00 ` ibv_post_send/recv kernel path optimizations (was: uverbs: handle large number of entries) Or Gerlitz
[not found] ` <4CEE7A22.2040706-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-11-26 11:56 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C644860408064B44854-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-12-01 8:11 ` ibv_post_send/recv kernel path optimizations Or Gerlitz
[not found] ` <4CF60343.7050602-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-12-08 12:14 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C64486040806673CF38-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-12-08 18:30 ` Jason Gunthorpe
2010-12-08 19:04 ` Roland Dreier
2010-12-14 14:12 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C644860408066ABCF66-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-12-14 18:17 ` Jason Gunthorpe [this message]
[not found] ` <20101214181735.GA2506-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-12-27 12:38 ` Or Gerlitz
[not found] ` <4D1888CB.2010101-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-12-27 15:18 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C644860408066C547E0-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-12-27 15:22 ` Or Gerlitz
[not found] ` <4D18AF2D.1010109-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-12-27 15:40 ` Walukiewicz, Miroslaw
2011-01-05 18:16 ` Roland Dreier
[not found] ` <ada4o9nfc6e.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-10 14:15 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C644860408066DDDF31-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-01-10 20:38 ` Roland Dreier
[not found] ` <adawrmc7av2.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-21 11:41 ` Walukiewicz, Miroslaw
[not found] ` <BE2BFE91933D1B4089447C644860408066F95285-IGOiFh9zz4wLt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-01-21 15:49 ` Hefty, Sean
[not found] ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25C1D51C31-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-01-24 17:03 ` Walukiewicz, Miroslaw
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=20101214181735.GA2506@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=Miroslaw.Walukiewicz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org \
--cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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;
as well as URLs for NNTP newsgroup(s).