> >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  <[email protected]>
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to