lkml.org 
[lkml]   [2017]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/3] percpu: improve allocation success rate for non-GFP_KERNEL callers
>> >
>> > Yes, this prevents adding more pcpu chunks and so cause "atomic" allocations
>> > to fail more easily.
>>
>> Then I fail to see what is the problem you are trying to fix.
>
> To be more specific. Could you describe what more can we do in the
> vmalloc layer for GFP_NOWAIT allocations? They certainly cannot sleep
> and cannot perform the reclaim so you have to rely on the background
> work.

The main problem that I am trying to fix is in percpu.c code. It
currently doesn't
even attempt to call vmalloc() for GFP_NOWAIT case. It solely relies on the
background allocator to replenish the reserves. I would like percpu.c to call
__vmalloc(GFP_NOWAIT) inline and see whether that succeeds. If that fails, it is
fair to fail the call.

For this to work, __vmalloc() should be ready to serve a caller that
is holding a
spinlock. The might_sleep() in alloc_vmap_area() basically prevents us calling
vmalloc in this context.

\
 
 \ /
  Last update: 2017-02-27 20:33    [W:0.083 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site