From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E747C433FE for ; Mon, 18 Apr 2022 05:12:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C2986B007E; Mon, 18 Apr 2022 01:12:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94AD38D0002; Mon, 18 Apr 2022 01:12:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EC6F6B0083; Mon, 18 Apr 2022 01:12:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 6E3536B007E for ; Mon, 18 Apr 2022 01:12:39 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 20DA380BFA for ; Mon, 18 Apr 2022 05:12:39 +0000 (UTC) X-FDA: 79368829638.08.50F2B15 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf08.hostedemail.com (Postfix) with ESMTP id 66BAD160002 for ; Mon, 18 Apr 2022 05:12:38 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 4B7A468AA6; Mon, 18 Apr 2022 07:12:34 +0200 (CEST) Date: Mon, 18 Apr 2022 07:12:34 +0200 From: Christoph Hellwig To: Ming Lei Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, Changhui Zhong Subject: Re: [PATCH V2] block: avoid io timeout in case of sync polled dio Message-ID: <20220418051234.GA3559@lst.de> References: <20220415034703.2081695-1-ming.lei@redhat.com> <20220415051844.GA22762@lst.de> <20220416054913.GA7405@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Authentication-Results: imf08.hostedemail.com; dkim=none; spf=none (imf08.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Stat-Signature: oxj4kieya6tett8cmyrc8pngmpdxgyjo X-Rspamd-Queue-Id: 66BAD160002 X-Rspamd-Server: rspam04 X-Rspam-User: X-HE-Tag: 1650258758-375062 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Apr 16, 2022 at 05:03:35PM +0800, Ming Lei wrote: > > Yes. But not doing this automatically also means you keep easily > > forgetting callsites. For example iomap still does not flush the plug > > in your patch. > > It is reasonable for flush user(usually submission) to be responsible > for finishing/flushing plug. Well, I very much disagree here. blk_flush_plug is not a publіc, exported API, and that is for a reason. A bio submission interface that requires flushing the plug to be useful is rather broken. > iomap is one good example to show this point, since it does flush the plug > before call bio_poll(), see __iomap_dio_rw(). iomap does not do a manual plug flush anywhere. iomap does finish the plug before polling, which makes sense. Now of course __blkdev_direct_IO_simple doesn't even use a plug to start with, so I'm wondering what plug this patch even tries to flush?