From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f67.google.com ([209.85.166.67]:38090 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbeLDP1l (ORCPT ); Tue, 4 Dec 2018 10:27:41 -0500 Received: by mail-io1-f67.google.com with SMTP id l14so13908444ioj.5 for ; Tue, 04 Dec 2018 07:27:40 -0800 (PST) Subject: Re: [PATCH 10/27] aio: don't zero entire aio_kiocb aio_get_req() To: Christoph Hellwig Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-11-axboe@kernel.dk> <20181204144921.GE3180@lst.de> From: Jens Axboe Message-ID: <466fed7f-3e89-c659-f150-3fd1a59d0271@kernel.dk> Date: Tue, 4 Dec 2018 08:27:38 -0700 MIME-Version: 1.0 In-Reply-To: <20181204144921.GE3180@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 12/4/18 7:49 AM, Christoph Hellwig wrote: >> - req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO); >> - if (unlikely(!req)) >> - return NULL; >> + req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL); >> + if (req) { >> + percpu_ref_get(&ctx->reqs); >> + req->ki_ctx = ctx; >> + INIT_LIST_HEAD(&req->ki_list); >> + refcount_set(&req->ki_refcnt, 0); >> + req->ki_eventfd = NULL; >> + } >> >> - percpu_ref_get(&ctx->reqs); >> - INIT_LIST_HEAD(&req->ki_list); >> - refcount_set(&req->ki_refcnt, 0); >> - req->ki_ctx = ctx; >> return req; > > Why the reformatting? Otherwise this looks fine to me: > > Reviewed-by: Christoph Hellwig Probably just the (over) abuse of likely/unlikely in aio.c. I can get rid of it. -- Jens Axboe