From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f194.google.com ([209.85.166.194]:35112 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbeLDSNh (ORCPT ); Tue, 4 Dec 2018 13:13:37 -0500 Received: by mail-it1-f194.google.com with SMTP id p197so15937047itp.0 for ; Tue, 04 Dec 2018 10:13:37 -0800 (PST) Subject: Re: [PATCH 05/27] block: ensure that async polled IO is marked REQ_NOWAIT To: Christoph Hellwig Cc: Bart Van Assche , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org References: <20181130165646.27341-1-axboe@kernel.dk> <20181130165646.27341-6-axboe@kernel.dk> <1543597960.4347.3.camel@acm.org> <6044f9e1-0175-823b-b923-998094bdca72@kernel.dk> <20181204144820.GC3180@lst.de> From: Jens Axboe Message-ID: <2e06ca6d-61c2-3a29-992e-70818819b9b4@kernel.dk> Date: Tue, 4 Dec 2018 11:13:31 -0700 MIME-Version: 1.0 In-Reply-To: <20181204144820.GC3180@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:48 AM, Christoph Hellwig wrote: > On Fri, Nov 30, 2018 at 10:17:49AM -0700, Jens Axboe wrote: >>> Setting REQ_NOWAIT from inside the block layer will make the code that >>> submits requests harder to review. Have you considered to make this code >>> fail I/O if REQ_NOWAIT has not been set and to require that the context >>> that submits I/O sets REQ_NOWAIT? >> >> It's technically still feasible to do for sync polled IO, it's only >> the async case that makes it a potential deadlock. > > I wonder if we want a REQ_ASYNC_POLL compound flag #define that sets > REQ_POLL and REQ_NOWAIT to make this blindly obvious. Yeah that might make sense, all the async cases should certainly use it, and sync can keep using REQ_POLL. I'll add that and fold where I can. -- Jens Axboe