Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759598AbZDNSf5 (ORCPT ); Tue, 14 Apr 2009 14:35:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759369AbZDNSd4 (ORCPT ); Tue, 14 Apr 2009 14:33:56 -0400 Received: from THUNK.ORG ([69.25.196.29]:56652 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759358AbZDNSdz (ORCPT ); Tue, 14 Apr 2009 14:33:55 -0400 Date: Tue, 14 Apr 2009 14:33:51 -0400 From: Theodore Tso To: Jens Axboe Cc: Nikanth Karthikesan , Neil Brown , linux-kernel@vger.kernel.org, Chris Mason , Andrew Morton , Dave Kleikamp , xfs-masters@oss.sgi.com Subject: Re: [PATCH 0/6] Handle bio_alloc failure Message-ID: <20090414183351.GK955@mit.edu> Mail-Followup-To: Theodore Tso , Jens Axboe , Nikanth Karthikesan , Neil Brown , linux-kernel@vger.kernel.org, Chris Mason , Andrew Morton , Dave Kleikamp , xfs-masters@oss.sgi.com References: <200904141636.26557.knikanth@novell.com> <20090414111838.GG5178@kernel.dk> <200904141711.20378.knikanth@suse.de> <20090414181632.GI955@mit.edu> <20090414182049.GI5178@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090414182049.GI5178@kernel.dk> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@mit.edu X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 26 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/