Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3199555pxb; Mon, 9 Nov 2020 05:25:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzE7ZskwUJyHfm5p/qNoOiFKph1g3Qlj9xC88BnqRcArEwx6o+bDQzjJMr6gGbADSkToWtK X-Received: by 2002:a17:906:af8b:: with SMTP id mj11mr9948806ejb.129.1604928353477; Mon, 09 Nov 2020 05:25:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604928353; cv=none; d=google.com; s=arc-20160816; b=LoU3ULYa/myfbgK16uV9lUgNUJ0zD6bhf3FcU0fzd4XOGVMd/kFEpWJr9HXdMKxwzm EetXz1T5J/5fOqulM7tl4kQleu7SXnY7cxpjL+GoVQFOZ8aBcH0M7TYwRi8I1Jjg3eS5 NvvWjd6c+9/fuKYAp9bfy7QE10Lzzr2qdzt5u+SqqwqfICkvCy/Sr4TjW/ThnpR8Oheb jOyaq5S0BziYk4z7Q42rJ98dWwwlufZ8yaAcIiHGgo50CiVZV7Fa0hIQAPX29sg8vUiN EtawXYVa2tGUCnvKVg7oqtiDr8VXd1duDAEMUSC9rISD7FgDii21w+KtGgyYBPj7BM5j t34w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mKN1R7qOsdbE85kEa+a2I1TFSDJRgQuLsqnthi71YV4=; b=TUhY8E0XOs1HUoH+OGihintlpkRgNJi+t5oDMLdsI3iHK9MMFZJBY8O6y3UYupScQn 2lYmUh3agFqyWKBJh2JcCWJVpmxB4k/D3R6JIEeOqqhy/Zi30+MvuH6r6ZM0Qu0P9kj8 /RE8jJPWsR6FhQKhRPxD0fSzT76G+2kCBClZUTvvG9qgvsrBe+L1eQ6gTj2E0waNCLs8 DDM0Fm6DsuL0QO8glYe/ErcrMXkqFgCCblDwSwpcczroO31S1QYUp/SINKyuPYBBUskR gL0aHJA7VZeAXAThbjpC4bkdXUFuPn8v/RIPMpqmOwLIEPe2+6bKhbOiW/Zuoe/v9+QB U9MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KLlZ4ngF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc4si6683807ejb.188.2020.11.09.05.25.28; Mon, 09 Nov 2020 05:25:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KLlZ4ngF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387637AbgKINYK (ORCPT + 99 others); Mon, 9 Nov 2020 08:24:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:46676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387480AbgKINTO (ORCPT ); Mon, 9 Nov 2020 08:19:14 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 400D7206D8; Mon, 9 Nov 2020 13:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927953; bh=T4yyToto1LNtWt2uFoW4AtB6C061JWC20AajmIIF5fM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KLlZ4ngFsGcX3OVEUII2c3ry2jxbntg2hgrxdMfM7hoCtlUjWozHfKIlKzbXeZ4rR chnZ9ghefy/PYqQM8c2/IxSu12D6VOfrc+TW4kI182fthAPdx+vNuQ2mRFNlFcqCNU T2keDnnjmYX5ZnsMrTJQnf5lR/BASDpAQ3jkAFxQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Begunkov , Jens Axboe , Sasha Levin Subject: [PATCH 5.9 078/133] io_uring: dont miss setting IO_WQ_WORK_CONCURRENT Date: Mon, 9 Nov 2020 13:55:40 +0100 Message-Id: <20201109125034.475257424@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125030.706496283@linuxfoundation.org> References: <20201109125030.706496283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Begunkov [ Upstream commit feaadc4fc2ebdbd53ffed1735077725855a2af53 ] Set IO_WQ_WORK_CONCURRENT for all REQ_F_FORCE_ASYNC requests, do that in that is also looks better. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/io_uring.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 64f214a3dc9dd..eba5f65493a10 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1140,6 +1140,9 @@ static void io_prep_async_work(struct io_kiocb *req) io_req_init_async(req); + if (req->flags & REQ_F_FORCE_ASYNC) + req->work.flags |= IO_WQ_WORK_CONCURRENT; + if (req->flags & REQ_F_ISREG) { if (def->hash_reg_file || (req->ctx->flags & IORING_SETUP_IOPOLL)) io_wq_hash_work(&req->work, file_inode(req->file)); @@ -6281,13 +6284,6 @@ static void io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe, if (unlikely(ret)) goto fail_req; } - - /* - * Never try inline submit of IOSQE_ASYNC is set, go straight - * to async execution. - */ - io_req_init_async(req); - req->work.flags |= IO_WQ_WORK_CONCURRENT; io_queue_async_work(req); } else { __io_queue_sqe(req, sqe, cs); -- 2.27.0