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 6C915C433F5 for ; Mon, 2 May 2022 16:02:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A2266B0071; Mon, 2 May 2022 12:02:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8529C6B0073; Mon, 2 May 2022 12:02:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71A3D6B0074; Mon, 2 May 2022 12:02:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 62AFB6B0071 for ; Mon, 2 May 2022 12:02:02 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1ECD221252 for ; Mon, 2 May 2022 16:02:02 +0000 (UTC) X-FDA: 79421269284.23.09480F0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id E926B1C008C for ; Mon, 2 May 2022 16:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651507320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WhK13cyvvNRDof38Ohe7xb1LD8hR0AEE7GmDQBzTVTk=; b=Jvx1OTvViZYqJ35nHfYblgFSiR0tJpDkMMeR0wbHWoIaSQd/tfPTDYHXhOGcn9WF/HDq1z K8nHXRz7v6HXWglQzzrLQmmpqqS+bwJcxJYjuJJ/MnCv5PKLHqdOl2Cs7mqF0YWeV84o2t 9Qk6d8aEOm3hYsEQNoW5GdYsgguxHUw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-318-mAuil42yM9qtlFOsLzx-lA-1; Mon, 02 May 2022 12:01:57 -0400 X-MC-Unique: mAuil42yM9qtlFOsLzx-lA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 66E60811E78; Mon, 2 May 2022 16:01:57 +0000 (UTC) Received: from T590 (ovpn-8-19.pek2.redhat.com [10.72.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7169404D2C2; Mon, 2 May 2022 16:01:53 +0000 (UTC) Date: Tue, 3 May 2022 00:01:48 +0800 From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, linux-xfs@vger.kernel.org, Changhui Zhong Subject: Re: [PATCH V2] block: ignore RWF_HIPRI hint for sync dio Message-ID: References: <20220420143110.2679002-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420143110.2679002-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Stat-Signature: ahy1p99hayi54dm6ht7wqkgxtfwr74nf Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Jvx1OTvV; spf=none (imf20.hostedemail.com: domain of ming.lei@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E926B1C008C X-HE-Tag: 1651507315-436981 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 Wed, Apr 20, 2022 at 10:31:10PM +0800, Ming Lei wrote: > So far bio is marked as REQ_POLLED if RWF_HIPRI/IOCB_HIPRI is passed > from userspace sync io interface, then block layer tries to poll until > the bio is completed. But the current implementation calls > blk_io_schedule() if bio_poll() returns 0, and this way causes io hang or > timeout easily. > > But looks no one reports this kind of issue, which should have been > triggered in normal io poll sanity test or blktests block/007 as > observed by Changhui, that means it is very likely that no one uses it > or no one cares it. > > Also after io_uring is invented, io poll for sync dio becomes legacy > interface. > > So ignore RWF_HIPRI hint for sync dio. > > CC: linux-mm@kvack.org > Cc: linux-xfs@vger.kernel.org > Reported-by: Changhui Zhong > Suggested-by: Christoph Hellwig > Signed-off-by: Ming Lei > --- > V2: > - avoid to break io_uring async polling as pointed by Chritoph Hello Jens, Can you take this patch if you are fine? Thanks, Ming