Re: [RfC PATCH] Add udmabuf misc device
From: Daniel Stone
Date: Fri Apr 06 2018 - 05:52:31 EST
Hi Gerd,
On 14 March 2018 at 08:03, Gerd Hoffmann <kraxel@xxxxxxxxxx> wrote:
>> Either mlock account (because it's mlocked defacto), and get_user_pages
>> won't do that for you.
>>
>> Or you write the full-blown userptr implementation, including mmu_notifier
>> support (see i915 or amdgpu), but that also requires Christian KÃnigs
>> latest ->invalidate_mapping RFC for dma-buf (since atm exporting userptr
>> buffers is a no-go).
>
> I guess I'll look at mlock accounting for starters then. Easier for
> now, and leaves the door open to switch to userptr later as this should
> be transparent to userspace.
Out of interest, do you have usecases for full userptr support? Maybe
another way would be to allow creation of dmabufs from memfds.
Cheers,
Daniel