lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RFC] rcu/tree: Use GFP_MEMALLOC for alloc memory to free memory pattern
> > We call it from atomic context, so we can not sleep, also we do not have
> > any existing context coming from the caller. I see that GFP_ATOMIC is high-level
> > flag and is differ from __GFP_ATOMIC. It is defined as:
> >
> > #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
> >
> > so basically we would like to have __GFP_KSWAPD_RECLAIM that is included in it,
> > because it will also help in case of high memory pressure and wake-up kswapd to
> > reclaim memory.
> >
> > We also can extract:
> >
> > __GFP_ATOMIC | __GFP_HIGH | __GFP_RETRY_MAYFAIL | __GFP_KSWAPD_RECLAIM
> >
> > but that is longer then
> >
> > GFP_ATMOC | __GFP_RETRY_MAYFAIL
>
> OK, if you are always in the atomic context then GFP_ATOMIC is
> sufficient. __GFP_RETRY_MAYFAIL will make no difference for allocations
> which do not reclaim (and thus not retry). Sorry this was not clear to
> me from the previous description.
>
Ahh. OK. Then adding __GFP_RETRY_MAYFAIL to GFP_ATOMIC will not make any effect.

Thank you for your explanation!

--
Vlad Rezki

\
 
 \ /
  Last update: 2020-04-01 15:24    [W:0.084 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site