xfs-masters
[Top] [All Lists]

Re: [PATCH 0/6] Handle bio_alloc failure

To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 0/6] Handle bio_alloc failure
From: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Date: Wed, 15 Apr 2009 18:46:06 +1000
Cc: Theodore Tso <tytso@xxxxxxx>, knikanth@xxxxxxx, jens.axboe@xxxxxxxxxx, neilb@xxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, chris.mason@xxxxxxxxxx, shaggy@xxxxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=GZDTgzWt6sx+84VcNJXYDHDUCdrgjtYEbl2/z39iHhpFhRIjYDRenKKAUPAmQ+e3OajziFSt2QU4STGgLP8gr6EtRQVfEV8BvDBdmhgc5vyf3E7F3x/tOJ5hRWLN+/l/yakXwEVOsxnJMoMXAcTYEUunzVzERkYPZSgiXG+ojZ4= ;
In-reply-to: <20090414114604.2d552cbb.akpm@xxxxxxxxxxxxxxxxxxxx>
References: <200904141636.26557.knikanth@xxxxxxxxxx> <20090414181632.GI955@xxxxxxx> <20090414114604.2d552cbb.akpm@xxxxxxxxxxxxxxxxxxxx>
User-agent: KMail/1.9.51 (KDE/4.0.4; ; )
On Wednesday 15 April 2009 04:46:04 Andrew Morton wrote:
> On Tue, 14 Apr 2009 14:16:32 -0400
> Theodore Tso <tytso@xxxxxxx> wrote:
> 
> > In include/linux/page_alloc.h,
> > __GFP_NOFAIL is documented as "will never fail", but it says
> > absolutely nothing about __GFP_WAIT.
> 
> In the present implementation, a __GFP_WAIT allocation for order <=3
> will only fail if the caller was oom-killed.
> 
> Which raises the question "what happens when a mempool_alloc() caller
> gets oom-killed?".
> 
> Seems that it will loop around in mempool_alloc() doing weak attempts
> to allocate memory, not doing direct reclaim while waiting for someone
> else to free something up.  hm.  I guess it'll recover eventually.

Yes, it doesn't have to reclaim anything (quite likely if we've
been OOM killed, reclaim is very difficult or impossible at this
point anyway). It will recover when an object gets returned to
the mempool by someone else. No point in using page allocator
reserve when we have guaranteed forward progress anyway.

<Prev in Thread] Current Thread [Next in Thread>