Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932921AbdIFPNC (ORCPT ); Wed, 6 Sep 2017 11:13:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:34892 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932729AbdIFPNA (ORCPT ); Wed, 6 Sep 2017 11:13:00 -0400 Date: Wed, 6 Sep 2017 17:12:59 +0200 From: Johannes Thumshirn To: Jens Axboe Cc: Javier =?iso-8859-1?Q?Gonz=E1lez?= , mb@lightnvm.io, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Javier =?iso-8859-1?Q?Gonz=E1lez?= , Matias =?iso-8859-1?Q?Bj=F8rling?= Subject: Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Message-ID: <20170906151259.ld5ccbidelbulfc7@linux-x5ow.site> References: <1504710066-4699-1-git-send-email-javier@cnexlabs.com> <1504710066-4699-2-git-send-email-javier@cnexlabs.com> <20170906150811.sa3vrrkbpv5rffeb@linux-x5ow.site> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1038 Lines: 21 On Wed, Sep 06, 2017 at 09:09:29AM -0600, Jens Axboe wrote: > On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: > > On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier Gonz?lez wrote: > >> Check for failed mempool allocations and act accordingly. > > > > Are you sure it is needed? Quoting from mempool_alloc()s Documentation: > > "[...] Note that due to preallocation, this function *never* fails when called > > from process contexts. (it might fail if called from an IRQ context.) [...]" > > It's not needed, mempool() will never fail if __GFP_WAIT is set in the > mask. The use case here is GFP_KERNEL, which does include __GFP_WAIT. Exactly. Maybe I shouldn't have it phrased as a question though... -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850