Re: Problem with RDMA device removal architecture

Steve Wise
2010-03-26T18:05:28Z

Steve Wise wrote:
>
>> But to Roland's point, how will we ummap resources?
>> If an application won't respond to device removal event and clean up
>> properly,
>> perhaps it is "okay" to let it crash. Alternatively, what about a
>> RDMA_CM_EVENT_DEVICE_REMOVAL_PENDING and RDMA_CM_EVENT_DEVICE_REMOVED
>> scheme.
>> Post the first event to allow good applications to clean up. The
>> second event
>> to notify apps that the device is "gone". After the second event, we
>> can then
>> get violent and shoot to kill?
>>
>
> You probably don't need the two events as you can detect when the apps
> free up these resources anyway. So your proposal boils down to:
> post the DEVICE_REMOVAL/ DEVICE_FATAL events, and wait some amount of
> time. After said timeout, you fire a SIGBUS at each process still
> owning resources for the device in question.
>
> Roland, is that terrible in your opinion?
>
>

Actually, we don't need to deliver the signal at all. Just continue
with the device removal after the timeout. The mapped resources would
get unmapped, I guess, and then accessing them would cause a fault in
the process.

So we try and wait for well behaved apps, but we don't hang the device
removal forever...