Re: [PATCH v2 05/17] mm/frame-vector: Use FOLL_LONGTERM

2020-10-16 Thread Daniel Vetter
On Fri, Oct 16, 2020 at 9:54 AM John Hubbard wrote: > > On 10/9/20 12:59 AM, Daniel Vetter wrote: > ... > > @@ -48,40 +47,25 @@ int get_vaddr_frames(unsigned long start, unsigned int > > nr_frames, > > > > start = untagged_addr(start); > > > > - mmap_read_lock(mm); > > - locked =

Re: [PATCH v2 05/17] mm/frame-vector: Use FOLL_LONGTERM

2020-10-16 Thread John Hubbard
On 10/9/20 12:59 AM, Daniel Vetter wrote: ... @@ -48,40 +47,25 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, start = untagged_addr(start); - mmap_read_lock(mm); - locked = 1; - vma = find_vma_intersection(mm, start, start + 1); - if (!vma) { -

[PATCH v2 05/17] mm/frame-vector: Use FOLL_LONGTERM

2020-10-09 Thread Daniel Vetter
This is used by media/videbuf2 for persistent dma mappings, not just for a single dma operation and then freed again, so needs FOLL_LONGTERM. Unfortunately current pup_locked doesn't support FOLL_LONGTERM due to locking issues. Rework the code to pull the pup path out from the mmap_sem critical