Message ID | 20200403083543.11552-3-mhocko@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm: few refinements to gfp flags documentation | expand |
On Fri, 3 Apr 2020, Michal Hocko wrote: > From: Michal Hocko <mhocko@suse.com> > > While it might be really clear to MM developers that gfp reclaim > modifiers are applicable only to sleepable allocations (those with > __GFP_DIRECT_RECLAIM) it seems that actual users of the API are not > always sure. Make it explicit that they are not applicable for > GFP_NOWAIT or GFP_ATOMIC allocations which are the most commonly used > non-sleepable allocation masks. > > Acked-by: Paul E. McKenney <paulmck@kernel.org> > Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: David Rientjes <rientjes@google.com>
On Fri, Apr 03, 2020 at 12:41:51PM -0700, David Rientjes wrote: > On Fri, 3 Apr 2020, Michal Hocko wrote: > > > From: Michal Hocko <mhocko@suse.com> > > > > While it might be really clear to MM developers that gfp reclaim > > modifiers are applicable only to sleepable allocations (those with > > __GFP_DIRECT_RECLAIM) it seems that actual users of the API are not > > always sure. Make it explicit that they are not applicable for > > GFP_NOWAIT or GFP_ATOMIC allocations which are the most commonly used > > non-sleepable allocation masks. > > > > Acked-by: Paul E. McKenney <paulmck@kernel.org> > > Signed-off-by: Michal Hocko <mhocko@suse.com> > > Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org> thanks, - Joel
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e3ab1c0d9140..8040fa944cd8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -127,6 +127,8 @@ struct vm_area_struct; * * Reclaim modifiers * ~~~~~~~~~~~~~~~~~ + * Please note that all the following flags are only applicable to sleepable + * allocations (e.g. %GFP_NOWAIT and %GFP_ATOMIC will ignore them). * * %__GFP_IO can start physical IO. *