From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f194.google.com ([209.85.166.194]:51898 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbeLUPht (ORCPT ); Fri, 21 Dec 2018 10:37:49 -0500 Received: by mail-it1-f194.google.com with SMTP id w18so7385763ite.1 for ; Fri, 21 Dec 2018 07:37:49 -0800 (PST) Subject: Re: [PATCH 08/22] aio: add submission side request cache To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, viro@zeniv.linux.org.uk References: <20181218154230.3120-1-axboe@kernel.dk> <20181218154230.3120-9-axboe@kernel.dk> <20181221112849.GD7319@lst.de> From: Jens Axboe Message-ID: <505cc9bb-7ba5-ccea-ee16-e4ca96ac062d@kernel.dk> Date: Fri, 21 Dec 2018 08:37:46 -0700 MIME-Version: 1.0 In-Reply-To: <20181221112849.GD7319@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/21/18 4:28 AM, Christoph Hellwig wrote: > On Tue, Dec 18, 2018 at 08:42:16AM -0700, Jens Axboe wrote: >> We have to add each submitted polled request to the io_context >> poll_submitted list, which means we have to grab the poll_lock. We >> already use the block plug to batch submissions if we're doing a batch >> of IO submissions, extend that to cover the poll requests internally as >> well. > > The way we make this conditional looks rather odd. What about something > like the untested patch below to clean this up a bit? I also think that > we don't need the explicit aio_flush_state_reqs call in aio_submit_state_end > given that blk_finish_plug already calls the supplied callback. I folded in most of this and fixed a few missed cases, and made it work with !CONFIG_BLOCK as well. I do think the flush is needed, if we did block and flushed the plug earier. -- Jens Axboe