lkml.org 
[lkml]   [2009]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: upcoming kerneloops.org item: get_page_from_freelist
On Wed, 24 Jun 2009 20:53:41 +0300
Pekka Enberg <penberg@cs.helsinki.fi> wrote:

> Hi Andrew,
>
> Andrew Morton wrote:
> > On Wed, 24 Jun 2009 19:55:24 +0300 Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> >
> >> On Wed, Jun 24, 2009 at 7:46 PM, Andrew Morton<akpm@linux-foundation.org> wrote:
> >>> Well yes. __Using GFP_NOFAIL on a higher-order allocation is bad. __This
> >>> patch is there to find, name, shame, blame and hopefully fix callers.
> >>>
> >>> A fix for cxgb3 is in the works. __slub's design is a big problem.
> >>>
> >>> But we'll probably have to revert it for 2.6.31 :(
> >> How is SLUB's design a problem here? Can't we just clear GFP_NOFAIL
> >> from the higher order allocation and thus force GFP_NOFAIL allocations
> >> to use the minimum required order?
> >
> > That could then lead to the __GFP_NOFAIL allocation attempt returning
> > NULL. But the callers cannot handle that and probably don't even test
> > for it - this is why they used __GFP_NOFAIL.
>
> No, the fallback allocation would still use __GFP_NOFAIL so the
> semantics are preserved.
>

<looks>

hm, I didn't know that slub could fall back to lower-order allocations
like that. Neat.

Yes, it looks like that change would improve things. We have had
reports before of machines which oomed over an order-1 attempt when
there were order-0 pages available. If that were to happen in
allocate_slab(__GFP_NOFAIL), things would get ugly and the patch would
help.

What's the expected value of s->min in allocate_slab()? In what
situations would it be >0?


btw, gcc has in the past made a mess of handling small copy-by-value
structs like 'struct kmem_cache_order_objects'. Probably it's improved
in recent years, but it'd be worth checking to see if
s/struct kmem_cache_order_objects/unsigned long/ generates better code.


\
 
 \ /
  Last update: 2009-06-24 20:33    [W:0.096 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site