lkml.org 
[lkml]   [2019]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mm/gup: remove unnecessary check against CMA in __gup_longterm_locked()
On Tue, Jun 4, 2019 at 4:30 PM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> On 6/4/19 12:56 PM, Pingfan Liu wrote:
> > The PF_MEMALLOC_NOCMA is set by memalloc_nocma_save(), which is finally
> > cast to ~_GFP_MOVABLE. So __get_user_pages_locked() will get pages from
> > non CMA area and pin them. There is no need to
> > check_and_migrate_cma_pages().
>
>
> That is not completely correct. We can fault in that pages outside
> get_user_pages_longterm at which point those pages can get allocated
> from CMA region. memalloc_nocma_save() as added as an optimization to
> avoid unnecessary page migration.
Yes, you are right.

Thanks,
Pingfan

\
 
 \ /
  Last update: 2019-06-04 10:50    [W:0.032 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site