xfs-masters
[Top] [All Lists]

Re: [PATCH 0/6] Handle bio_alloc failure

To: Jens Axboe <jens.axboe@xxxxxxxxxx>
Subject: Re: [PATCH 0/6] Handle bio_alloc failure
From: Theodore Tso <tytso@xxxxxxx>
Date: Tue, 14 Apr 2009 14:33:51 -0400
Cc: Nikanth Karthikesan <knikanth@xxxxxxx>, Neil Brown <neilb@xxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Chris Mason <chris.mason@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>, xfs-masters@xxxxxxxxxxx
In-reply-to: <20090414182049.GI5178@xxxxxxxxx>
Mail-followup-to: Theodore Tso <tytso@xxxxxxx>, Jens Axboe <jens.axboe@xxxxxxxxxx>, Nikanth Karthikesan <knikanth@xxxxxxx>, Neil Brown <neilb@xxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Chris Mason <chris.mason@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>, xfs-masters@xxxxxxxxxxx
References: <200904141636.26557.knikanth@xxxxxxxxxx> <20090414111838.GG5178@xxxxxxxxx> <200904141711.20378.knikanth@xxxxxxx> <20090414181632.GI955@xxxxxxx> <20090414182049.GI5178@xxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Apr 14, 2009 at 08:20:49PM +0200, Jens Axboe wrote:
> 
> It's a bio_alloc() guarantee, it uses a mempool backing. And if you use
> a mempool backing, any allocation that can wait will always be
> satisfied.
> 

Am I missing something?  I don't see anything in
include/linux/mempool.h or mm/mempool.c, or in block/blk-core.c or
include/linux/bio.h which documents that GFP_WAIT implies that
bio_alloc() will always succeed.   

My concern is that at some point in the future, someone either in the
block device layer or in mm/mempool.c will consider this an
implementation detail, and all of sudden calls to bio_alloc() with
GFP_WAIT will start failing and the resulting hilarty which ensues
won't be easily predicted by the developer making this change.

Regards,

                                        - Ted

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