[openib-general] Re: RFD: uverbs and hotplug

Michael S. Tsirkin mst at mellanox.co.il
Tue May 3 12:29:24 PDT 2005


Quoting r. Roland Dreier <roland at topspin.com>:
> Subject: Re: RFD: uverbs and hotplug
> 
>     Michael> Hello, Roland, all!  How should hotplug work with uverbs?
>
> ...
>
> Another possibility is as you described: free all the resources
> allocated by userspace processes (including remapping any doorbell
> pages) before allowing the hot-remove to proceed.  In this case, one
> could generate an asynchronous event to tell applications that their
> HCA is now gone.

Okay, so this approach makes the most sense to me:

Driver remaps the doorbell pages for all processes,
signals to applications that their HCA is gone, closes
the CQs/QPs/MRs, and lets the hotplug proceed.

Seems to work, almost.

The application will get a completion with error, and it just
needs a way to know that its because of the HCA going away,
so it seems to me you have to signal the event before closing the QPs,
not after that.

Hmm, it also seems that since posting work request on a closed qp does not
produce a new work request, a post will need to check a state flag so that post
on such a qp fails.
Thats probably why you have /* XXX check that state is OK to post send */
at the top of mthca post send?
But I dont see how to set the state field without a race?

-- 
MST - Michael S. Tsirkin



More information about the general mailing list