Re: Problem with RDMA device removal architecture

Roland Dreier
2010-03-26T20:45:27Z

> >uverbs is trickier, because a userspace process will typically have some
> >hardware resources directly mmap'ed. We need a way to "revoke" that
> >mmap and have it point at a dummy page until userspace releases it --
> >and last I looked I wasn't sure how to do that.

> Isn't "revoking" the mmap enough, why do we need to remap it
> to a dummy page? Why not just let the app hang on to the allocated virtual
> memory until it exits? I am thinking of registered memory here.

If you revoke the mmap, then presumably the process will seg fault if it
tries to access the page. So you need to point the map to some real
page to handle accesses until the process actually closes the device.

(And I think what we'll want to do is queue up the "catastrophic error"
async event and then immediately allow the low-level device to reset, so
we need to handle the mmap in a way that doesn't kill the app; otherwise
there's no way for even a well-behaved app to avoid crashing, since it
might be about to do an MMIO to the mmapped registers just as the async
event is created)
--
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
For corporate legal information go to: