lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory allocation on speculative fastpaths
On Tue 03-05-22 08:59:13, Paul E. McKenney wrote:
> Hello!
>
> Just following up from off-list discussions yesterday.
>
> The requirements to allocate on an RCU-protected speculative fastpath
> seem to be as follows:
>
> 1. Never sleep.
> 2. Never reclaim.
> 3. Leave emergency pools alone.
>
> Any others?
>
> If those rules suffice, and if my understanding of the GFP flags is
> correct (ha!!!), then the following GFP flags should cover this:
>
> __GFP_NOMEMALLOC | __GFP_NOWARN

GFP_NOWAIT | __GFP_NOMEMALLOC | __GFP_NOWARN

> Or is this just a fancy way of always returning NULL or some such? ;-)

It could fail quite easily. We would also want to guarantee (by
documenting I guess) that the page allocator never does anything that
would depend or invoke rcu_synchronize or something like that.

I believe this is the case currently.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2022-05-03 18:04    [W:0.071 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site