From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:53210 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbeL0N47 (ORCPT ); Thu, 27 Dec 2018 08:56:59 -0500 Date: Thu, 27 Dec 2018 14:56:56 +0100 From: Christoph Hellwig To: Jens Axboe Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-block@vger.kernel.org, hch@lst.de, viro@zeniv.linux.org.uk Subject: Re: [PATCH 09/22] aio: add submission side request cache Message-ID: <20181227135656.GC25525@infradead.org> References: <20181221192236.12866-1-axboe@kernel.dk> <20181221192236.12866-10-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181221192236.12866-10-axboe@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > +/* > + * After the iocb has been issued, it's safe to be found on the poll list. > + * Adding the kiocb to the list AFTER submission ensures that we don't > + * find it from a io_getevents() thread before the issuer is done accessing > + * the kiocb cookie. > + */ > +static void aio_iopoll_iocb_issued(struct aio_submit_state *state, > + struct aio_kiocb *kiocb) > +{ > + if (!state || !IS_ENABLED(CONFIG_BLOCK)) > + aio_iopoll_iocb_add_list(kiocb); This still looks odd to me. Why would be make a batch or not batch decision based on CONFIG_BLOCK availability? Either batching is safe for all ops, in which case we should always enabled it, or it only makes sense for block devices / block backed filesystem in which case we need a per-operation check.