Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Matthew Small <matthewtsmall-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Fork safe clarification
Date: Thu, 1 Apr 2010 10:09:48 -0400	[thread overview]
Message-ID: <s2pbb8be6ca1004010709hf5d0fe3cr2a76f28eaab97373@mail.gmail.com> (raw)

I am trying to understand the behavior of the libibverbs after it has been
set into fork safe mode via a successful call to ibv_fork_init() or setting
the environmental variable IBV_FORK_SAFE.  For my purposes I would like to
know the following :

Are PDs, QPs and CQs created before a fork shared by the parent and child
after fork() has returned (ie. both can submit WRs, poll CQ, etc.)?


What about MRs registered before the fork?  Even though the child doesn't
have access to the parent's memory, can he sill submit WRs on a QP with an
MR created before the fork?


What if the MR pages in the above scenario are accessible in both parent and
child (shared memory)?  Are there complications with registering shared
memory?


In general, are pointers returned by libibverbs pointer to user/process
address space (as ibv_mr pointers must be) or kernel space (eg.  if an
unrelated process had another process's QP pointer, lkey, and a virtual
address could it post (almost certainly unsafely) a WR to the other
process's QP?


Sorry if the questions seem progressively more goofy and thanks in advance
for any clarification.

-Matt
--
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-04-01 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 14:09 Matthew Small [this message]
     [not found] ` <s2pbb8be6ca1004010709hf5d0fe3cr2a76f28eaab97373-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-07 17:09   ` Fork safe clarification Matthew Small
2010-04-07 17:13   ` Roland Dreier

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=s2pbb8be6ca1004010709hf5d0fe3cr2a76f28eaab97373@mail.gmail.com \
    --to=matthewtsmall-re5jqeeqqe8avxtiumwx3w@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