Messages in this thread | | | Date | Fri, 11 Sep 2009 00:40:19 -0600 | From | Jason Gunthorpe <> | Subject | Re: [ofa-general] Re: [GIT PULL] please pull ummunotify |
| |
On Thu, Sep 10, 2009 at 11:22:20PM -0700, Roland Dreier wrote:
> As I said, it does mean that MPI can invalidate cached registrations for > COWed memory, which might be useful in case a parent forks and then > touches memory it used to use for RDMA, but I think that's the easier > part of the fork/COW problem.
What happens to all the other IB resources (PD, CQ, QP, etc) on fork?
AFAIK, pretty much by design the IB stack cannot/does not duplicate these objects.
The natural consequence is that a PD is always associated with a single process at a time, thus a memory registration which is associated with a PD must also be associated with a single process.
So.. What is the problem with fork? The semantics of what should happen seem natural enough to me, the PD doesn't get copied to the child, so the MR stays with the parent. COW events on the pinned region must be resolved so that the physical page stays with the process that has pinned it - the pin is logically released in the child because the MR doesn't exist because the PD doesn't exist.
Is this a general problem with the MR mechanism? If I mmap(MAP_SHARED|MAP_READONLY) and someone mmaps(MAP_PRIVATE|MAP_WRITE) on the same file I can generate COW events - will this make RDMAs go randomly too??
Jason
| |