Re: [PATCH V1 for-next 2/2] IB/mlx4_ib: Disassociate support

Yishai Hadas
2014-11-18T17:14:27Z

On 11/18/2014 4:42 PM, Or Gerlitz wrote:
> On 11/18/2014 2:11 PM, Yishai Hadas wrote:
>> Implements the IB core disassociate_ucontext API. The driver detaches
>> the HW
>> resources for a given user context to prevent a dependency between
>> application
>> termination and device disconnecting. This is done by managing the
>> VMAs that
>> were mapped to the HW bars such as door bell and blueflame. When need
>> to detach
>> remap them to an arbitrary kernel page returned by the zap API.
>>
>>
>
> Guys,
>
> Can we somehow make this patch generic (e.g land in the IB core) such
> that it can apply also for mlx5 (and other HW drivers...) basically, the
> HW driver should tell the IB core which pages to zap and we should be
> OK, isn't that?

We introduced a generic API that asked the low level driver to detach a
given ucontext from its HW resources. The specific driver implementation
may be different between HW devices and may not involve the zap usage,
that's why it wasn't put in IB core. In addition, the zap API should be
in sync with inflight VMA closing to prevent zapping an already unmapped
address. To achieve that the driver should implement some VMA ops and
synchronize between those flows. That code looks like something that fit
to be done in the driver and not as part of a IB core.

> Or.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html