[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0905111628370.8638@chino.kir.corp.google.com>
Date: Mon, 11 May 2009 16:37:13 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: gregkh@...e.de, npiggin@...e.de, mel@....ul.ie,
a.p.zijlstra@...llo.nl, cl@...ux-foundation.org,
dave@...ux.vnet.ibm.com, san@...roid.com, arve@...roid.com,
linux-kernel@...r.kernel.org
Subject: Re: [patch 08/11 -mmotm] oom: invoke oom killer for __GFP_NOFAIL
On Mon, 11 May 2009, Andrew Morton wrote:
> That assumes that the oom-killer is triggered - in the typical
> kernel developer testing, that won't happen.
>
> I think what we should do here is to prevent people even attempting to
> use __GFP_NOFAIL with higher-order allocations.
>
You could just add WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL) in the check for
order != 0 in __alloc_pages_internal() to keep it out of the fastpath and
make it appear when we have to reclaim. That still probably has less
coverage than you want, but these allocations have a high probability of
triggering reclaim anyway so it should be pretty obvious.
> Are you aware of any callsite which is presently using __GFP_NOFAIL on
> order>0 allocations?
>
Nope.
> I expect slub might cause this to happen due to its habit of using
> larger-than-needed orders for small objects. For example, cxgb3 is
> passing __GFP_NOFAIL into alloc_skb().
>
slub_max_order is set to PAGE_ALLOC_COSTLY_ORDER by default, so this would
have to be overridden by the user on the command line unless a single
object can't fit into such a slab.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists