Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6401828rwi; Tue, 18 Oct 2022 11:55:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ioL0Cc7vIOFSGNPShBq8JiNEoVpjlUpiFUW3m7oqgUEVas1p4gNfx3ji4RlRebAKD1vPs X-Received: by 2002:a17:906:c152:b0:78d:9dbb:150b with SMTP id dp18-20020a170906c15200b0078d9dbb150bmr3477460ejc.542.1666119342898; Tue, 18 Oct 2022 11:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666119342; cv=none; d=google.com; s=arc-20160816; b=BU28n4hmeM/W5yVI+zvEFqhXCpitrgK8oRjkr4xjYDTL8bSViXp1QYnQ38s//j5wdb N4oZQPGbpx/pNXdcwvH84eB+ztBRoK/doWVzmS7rY8kHB1l1B7fubH2b5hD552MswDi1 YbYEoESR4CmOX2bT522F95WFF5dEzFuWUYOkiBqrMPce40t07wi/CpXZNXoxxoXfRQIG lLHwBQosPbjoDbYjfx1tRmZns8pRuWPxyFarfouwsX+6W8qmGZu+jfkWOBH+3azRGJv9 OyT5VhR2nRwzneTG+uwrGjvUaNN/mMFAyLi+Kev2p7u4W3C/DrYCZzQP1MOS7ZCvr6DN /aXA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OEXvp1IreEp3SXV31DiUhQRIjvrLdojheHeDjSM1+mQ=; b=eCQ0ZxbebRx92UJMBBqMiRF1Sd4X0pSrDnHWT24iB8HJ4hQFj5WlQyZTv1fNfVHsFR Lbrklgcv6gFvvEHWzVptp9iVf1dkG5lu0d3DaMA5dwYXUxmYgtvAuRrUB6Tzcx3spVMx uC5y07DluNNPnU6cNiVt5UAnkYr3aluutYN5HuiqqJWvXt15OdoN549NWAPFJY0Pc18/ RjPbb4PCnSV5ujaveVGf3rOAsrOUBKhHa0nmooVzVNWGueeP/Ul0f5gKhKFNRESVmExQ wLb+77fIrqyAJqLIzxahU+ufAhm3SBaAdoharOTQnQKdkJ43gA846FrmtWVgNdF+OiZ5 A8yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StZ853wy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hh21-20020a170906a95500b0073d8e4e8c77si12302353ejb.1005.2022.10.18.11.55.17; Tue, 18 Oct 2022 11:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StZ853wy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230299AbiJRStI (ORCPT + 99 others); Tue, 18 Oct 2022 14:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbiJRSs5 (ORCPT ); Tue, 18 Oct 2022 14:48:57 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4589EA0242; Tue, 18 Oct 2022 11:48:50 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id d26so34480907eje.10; Tue, 18 Oct 2022 11:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OEXvp1IreEp3SXV31DiUhQRIjvrLdojheHeDjSM1+mQ=; b=StZ853wy/e5RtsJT54EGTUKpdC1tUlgOYlrs3sEGGMffoVhFCAcySZ+zNVfaD1MQTp hMR7D7Kq7Xkwj7xChLcHAirblIX5aaAaqxy0G/6wY09rasb4Wyz7bPp1wQmhVBenkfs3 XaUUSrpMu+p7lybYOS2F+fq432f0WVK60coyn97CguE3CAs29HGOugjHrvxF/A8W/foA evsF12c3sbuzYKU+33M7yTxBruThoComQQJs1211x2nevgPNAk6CvOnmOw1ecu6qEER1 33dhbDf7rIyUZWUKI6TvvvWxR8b8S8I4Ekt328WSeicvjAGCOySDvgplDFdTSIHYEOGB dNUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OEXvp1IreEp3SXV31DiUhQRIjvrLdojheHeDjSM1+mQ=; b=rEd69rZm96JdZRjEzTiuJU0cq2IEvTSYB/FkH6WI4irV8c43pxo5+DKOLhwryrb9S5 0TkKESplNyIfm/U4omXALfThSThVt5EQbdhIkjHOgfHsefn9JTX7uWkjjXy/YB7q37SM g47aueFhSKrnHl4zXEk00JgqZjwNJ8Saeq21q9a16xlrd5gb2RMQt6B7RFOD5DPwRcju eTMlNCQ746UTuKhEwzC0ZET3YWlo96bhccNVfzK3ePNFGlTQtvV4EmdNshLPPKjT2/MA jY2Eyh7/HPtKp96rgZDRXMxh/0573Sl0cf+xefMld3+XSi7eAnm/eoq3gFUktb//zZPX HMVQ== X-Gm-Message-State: ACrzQf0WXswtPtC8zGQWolWrabbjJwLwiaTivXRENkJPoLC12lft6WaQ fwJpaDaQM2e3r056f3+apB0= X-Received: by 2002:a17:907:7632:b0:78d:b5ba:87db with SMTP id jy18-20020a170907763200b0078db5ba87dbmr3568466ejc.661.1666118928064; Tue, 18 Oct 2022 11:48:48 -0700 (PDT) Received: from 127.0.0.1localhost (94.197.72.2.threembb.co.uk. [94.197.72.2]) by smtp.gmail.com with ESMTPSA id j18-20020a17090623f200b0078db18d7972sm7855355ejg.117.2022.10.18.11.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:48:47 -0700 (PDT) From: Pavel Begunkov To: Jens Axboe , linux-block@vger.kernel.org Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Pavel Begunkov Subject: [RFC for-next 4/4] io_uring/rw: enable bio caches for IRQ rw Date: Tue, 18 Oct 2022 19:47:16 +0100 Message-Id: <11cf38513c45083955d4ee2cedbb46df0a9f6081.1666114003.git.asml.silence@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now we can use IOCB_ALLOC_CACHE not only for iopoll'ed reads/write but also for normal IRQ driven I/O. Signed-off-by: Pavel Begunkov --- io_uring/rw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_uring/rw.c b/io_uring/rw.c index 100de2626e47..ff609b762742 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -667,6 +667,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode) ret = kiocb_set_rw_flags(kiocb, rw->flags); if (unlikely(ret)) return ret; + kiocb->ki_flags |= IOCB_ALLOC_CACHE; /* * If the file is marked O_NONBLOCK, still allow retry for it if it @@ -682,7 +683,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode) return -EOPNOTSUPP; kiocb->private = NULL; - kiocb->ki_flags |= IOCB_HIPRI | IOCB_ALLOC_CACHE; + kiocb->ki_flags |= IOCB_HIPRI; kiocb->ki_complete = io_complete_rw_iopoll; req->iopoll_completed = 0; } else { -- 2.38.0