Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-04 Thread Pavel Tatashin
On Fri, Dec 4, 2020 at 3:54 AM Michal Hocko wrote: > > On Fri 04-12-20 09:43:13, Michal Hocko wrote: > > On Thu 03-12-20 10:15:41, Pavel Tatashin wrote: > [...] > > > Also, current_gfp_context() is used elsewhere, and in some > > > places removing __GFP_MOVABLE from gfp_mask means that we will

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-04 Thread Michal Hocko
On Fri 04-12-20 09:43:13, Michal Hocko wrote: > On Thu 03-12-20 10:15:41, Pavel Tatashin wrote: [...] > > Also, current_gfp_context() is used elsewhere, and in some > > places removing __GFP_MOVABLE from gfp_mask means that we will need to > > also change other things. For example [1], in

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-04 Thread Michal Hocko
On Thu 03-12-20 10:15:41, Pavel Tatashin wrote: > On Thu, Dec 3, 2020 at 4:17 AM Michal Hocko wrote: > > > > On Wed 02-12-20 00:23:29, Pavel Tatashin wrote: > > [...] > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > > index 611799c72da5..7a6d86d0bc5f 100644 > > > --- a/mm/page_alloc.c > >

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread John Hubbard
On 12/3/20 7:06 AM, Pavel Tatashin wrote: ... diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 611799c72da5..7a6d86d0bc5f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3766,20 +3766,25 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) return alloc_flags; }

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread Pavel Tatashin
On Thu, Dec 3, 2020 at 4:17 AM Michal Hocko wrote: > > On Wed 02-12-20 00:23:29, Pavel Tatashin wrote: > [...] > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 611799c72da5..7a6d86d0bc5f 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -3766,20 +3766,25 @@

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread Pavel Tatashin
On Thu, Dec 3, 2020 at 3:17 AM John Hubbard wrote: > > On 12/1/20 9:23 PM, Pavel Tatashin wrote: > > PF_MEMALLOC_NOMOVABLE is only honored for CMA allocations, extend > > this flag to work for any allocations by removing __GFP_MOVABLE from > > gfp_mask when this flag is passed in the current

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread Michal Hocko
On Wed 02-12-20 00:23:29, Pavel Tatashin wrote: [...] > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 611799c72da5..7a6d86d0bc5f 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3766,20 +3766,25 @@ alloc_flags_nofragment(struct zone *zone, gfp_t > gfp_mask) > return

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread John Hubbard
On 12/1/20 9:23 PM, Pavel Tatashin wrote: PF_MEMALLOC_NOMOVABLE is only honored for CMA allocations, extend this flag to work for any allocations by removing __GFP_MOVABLE from gfp_mask when this flag is passed in the current context, thus prohibiting allocations from ZONE_MOVABLE.

[PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-01 Thread Pavel Tatashin
PF_MEMALLOC_NOMOVABLE is only honored for CMA allocations, extend this flag to work for any allocations by removing __GFP_MOVABLE from gfp_mask when this flag is passed in the current context, thus prohibiting allocations from ZONE_MOVABLE. Signed-off-by: Pavel Tatashin --- mm/hugetlb.c| 2