Re: [PATCH] mm/gup: remove unnecessary check against CMA in __gup_longterm_locked()

2019-06-04 Thread Pingfan Liu
On Tue, Jun 4, 2019 at 4:30 PM Aneesh Kumar K.V 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

Re: [PATCH] mm/gup: remove unnecessary check against CMA in __gup_longterm_locked()

2019-06-04 Thread Aneesh Kumar K.V
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

[PATCH] mm/gup: remove unnecessary check against CMA in __gup_longterm_locked()

2019-06-04 Thread Pingfan Liu
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(). Signed-off-by: Pingfan Liu Cc: Andrew Morton Cc: Ira Weiny Cc: Dan