public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Christopher Mitchell
	<christopher-1z5WdJkP5Frk1uMJSBkQmQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Subject: Re: Sharing MR Between Multiple Connections
Date: Wed, 14 Nov 2012 09:27:58 +0100	[thread overview]
Message-ID: <1352881678.3346.39.camel@test.quest-ce.net> (raw)
In-Reply-To: <CAPb9-SHQ=r1MYu=771z2cTi9bAq=ueWMjw2vFDoSHbNByK5awA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Le mardi 13 novembre 2012 à 23:36 -0500, Christopher Mitchell a écrit :
> Hi,
> 
> I am working on building an Infiniband application with a server that
> can handle many simultaneous clients. The server exposes a chunk of
> memory that each of the clients can read via RDMA. I was previously
> creating a new MR on the server for each client (and of course in that
> connection's PD). However, under stress testing, I realized that
> ibv_reg_mr() started failing after I simultaneously MRed the same area
> enough times to cover 20.0 GB. I presume that the problem is reaching
> some pinning limit, although ulimit reports "unlimited" for all
> relevant possibilities.

There's a limit of the number of registered memory region per HCA.

See ibv_query_device(), struct ibv_device_attr, field max_mr.

>  I tried creating a single global PD and a
> single MR to be shared among the multiple connections, but
> rdma_create_qp() fails with an invalid argument when I try to do that.
> I therefore deduce that the PD specified in rdma_create_qp() must
> correspond to an active connection, not simply be created by opening a
> device.
> 
> Long question short: is there any way I can share the same MR among
> multiple clients, so that my shared memory region is limited to N
> bytes instead of N/C (clients) bytes?
> 

If each rdma_cm_id descriptor is tied to the same ibv_context, you might
be able to share one memory pool registered with ibv_reg_mr().
This is quite usual since you are likely to have only one HCA in your
system. Get a first context after binding your listening rdma_cm_id. 

Regards

-- 
Yann Droneaud
OPTEYA


--
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

  parent reply	other threads:[~2012-11-14  8:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14  4:36 Sharing MR Between Multiple Connections Christopher Mitchell
     [not found] ` <CAPb9-SHQ=r1MYu=771z2cTi9bAq=ueWMjw2vFDoSHbNByK5awA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-14  5:47   ` Fwd: " Christopher Mitchell
     [not found]     ` <CAPb9-SHVmNFm-rCviMLfu7GQhK065fWGTGzJssxLrLMZHDMFpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-14  6:09       ` Christopher Mitchell
2012-11-14 17:13       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A8237346AD8B5A-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-11-14 18:05           ` Christopher Mitchell
     [not found]             ` <CAPb9-SEHXKKmVGhsxTrku19H1q3hBE=iejjYMOfMSk+K1W09Zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-14 18:19               ` Hefty, Sean
     [not found]                 ` <1828884A29C6694DAF28B7E6B8A8237346AD8BC5-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-11-15  0:06                   ` Christopher Mitchell
2012-11-14  8:27   ` Yann Droneaud [this message]
2012-11-14 13:40   ` Atchley, Scott

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=1352881678.3346.39.camel@test.quest-ce.net \
    --to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
    --cc=christopher-1z5WdJkP5Frk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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