public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: lihaidong <lihaidong-6gUaA8visnnQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Fw: About FRMR vec and SRQ post recv
Date: Mon, 08 Mar 2010 08:58:03 -0600	[thread overview]
Message-ID: <4B95107B.20503@opengridcomputing.com> (raw)
In-Reply-To: <201003072113223754872-6gUaA8visnnQT0dZR+AlfA@public.gmane.org>

lihaidong wrote:
> Sorry.
> sge[1]= {vec1_addr, vec1_length, dma_lkey};
> should be
> sge[1]= {vec2_addr, vec2_length, dma_lkey};
> >Hi, Steve.
> >I have the following questions.
> >1)FRMR
> >I want transfer the data in vec1 and vec2 in node A to the two vecs
> with the same size in node B. Vecs' size is lower than a page.
> >A B
> >+--------+ +--------+
> >| vec1 | | vec1 |
> >+--------+ +--------+
> >
> >+--------+ +--------+
> >| vec2 | | vec2 |
> >+--------+ +--------+
> >
> >Could I use FRMR to register vec1 and vec2 as one Memory region?


yes. There are certain contstraints though. For example, vec1 has to be
physically contiguous and end on a page boundary, and vec2 would have to
start on a page boundary and be physically contiguous. IE fastreg mrs
are typically used to register an array of pages (not necessarily all
contiguous pages), not arbitrary regions.


> >If so, then they have the same rkey, and I could send them to remote
> peer for one time,right?



Yes, if you have the two vecs fast registered as one mr, then you could
send it using a single work request and even a single SGE in that work
request.



> >Or I have to register and send vec1 and vec2 seperately?
> >
> >If I use Send/Recv not RDMA Read/Write to send them. ie. I will use
> dma_mr's lkey/rkey, and let
> >sge[0]= {vec1_addr, vec1_length, dma_lkey};
> >sge[1]= {vec1_addr, vec1_length, dma_lkey};
> >ib_send_wr.sgl_list= sge;
> >

Not exactly. The result of fast registering those two regions would be a
single iova_base (aka the addr field in an SGE) and [lr]key. Those would
be used to describe the data in a send wr, probably as a single SGE.

It sounds like what you really need is either to use a dma mr or to
register the regions separately. Unless those vecs meet the criteria I
mentioned above..


> >and post send this wr. Is it allowed?
> >2) SRQ
> >SRQ's size is 1024, and I use ib_post_srq_recv 1024 times after
> getting SRQ created.
> >When cq_handler get a IB_WC_RECV event, do I need post another recv
> wr?(since in the case without SRQ, it would be yes)


I don't know much about SRQs, maybe someone else knows how these are
implemented.



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

       reply	other threads:[~2010-03-08 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201003072109161566975@inspur.com>
     [not found] ` <201003072113223754872@inspur.com>
     [not found]   ` <201003072113223754872-6gUaA8visnnQT0dZR+AlfA@public.gmane.org>
2010-03-08 14:58     ` Steve Wise [this message]
     [not found]   ` <201003090948570789220@inspur.com>
     [not found]     ` <201003090948570789220-6gUaA8visnnQT0dZR+AlfA@public.gmane.org>
2010-03-09  3:04       ` Fw: About FRMR vec and SRQ post recv Steve Wise
     [not found]     ` <201003091142236565650@inspur.com>
     [not found]       ` <201003091142236565650-6gUaA8visnnQT0dZR+AlfA@public.gmane.org>
2010-03-09  3:53         ` Steve Wise

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=4B95107B.20503@opengridcomputing.com \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=lihaidong-6gUaA8visnnQT0dZR+AlfA@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