Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp17438rwi; Tue, 18 Oct 2022 13:29:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4r9gkZPg4Pwd/bx9I7ERsX7zAuA2FvrvZ5DX5xKUA4SLp3r9svicIOtkzxzi+oweqtIgbE X-Received: by 2002:a17:907:d26:b0:78e:20c6:9f77 with SMTP id gn38-20020a1709070d2600b0078e20c69f77mr3832278ejc.243.1666124969059; Tue, 18 Oct 2022 13:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666124969; cv=none; d=google.com; s=arc-20160816; b=fatxYY4Io5sL5TRV29S4ti0vqasSnWpqhCKxYsSn1+InBY9FNwgXByAHz9fOSHbWEz ppMAz3yEc8L0sAanqqu8C2Rsj6HN2PjAdupogML61eOQesNMlJwKnywWirbsmD8Az3+P Vge8zz/YD5oNQPCVGVfgHG40CGoUtPGcbc4t8Gspy71wiSiv9hXp1ck6SXc1NPtSv4g8 n6lQR+uIT5p7A99WDH4AGxbR9axfNBSSYCg7PbknxvPCXHT3C/1qp66Jxtcjz9E+iQtJ p2DnpVJpv1NGKoxX7YyO1jsfNlVM7vZI1BbZ9Dfb3ZtspBKqb5yApZzhAhMvEd3TuwuF yR3A== 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=wDSrci8X84AcWDLtenW3aFMdhSjJpe4xP2EnnugBOeyYjdaa+h6n/kl/Ye3HEBHPWG p/3Kof75nwmHsnZM0MiPjbsXjDDm3vdmDo4CeXjHEC2Vm3y5qIKQzzFqqwuPYyQhWpkT Y/ceJdnHh3j5XInIDPG25ByeJbIIDrA+3SePdVsZDynsaHH4kUkyWjvilaZdp2Rof+x0 OhKxz7RbSshK+BMCBNe48pUlT2jeF0z6C/N67ykMwiWBH5LweSZe4t4Lg0XQKZu1DqtT irVOf4KiO7MOukLEHfiQv6dNdLh2rqb0mtUXw1xu5x/IeN/86RNnBNMJN6XsHxcYs/ma 4PUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="abLxG+/l"; 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 v18-20020aa7dbd2000000b00447d6f244c6si10851356edt.248.2022.10.18.13.29.02; Tue, 18 Oct 2022 13:29:29 -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="abLxG+/l"; 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 S229635AbiJRTw4 (ORCPT + 99 others); Tue, 18 Oct 2022 15:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbiJRTwk (ORCPT ); Tue, 18 Oct 2022 15:52:40 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 934E185ABC; Tue, 18 Oct 2022 12:52:30 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id d26so34897700ejc.8; Tue, 18 Oct 2022 12:52:30 -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=abLxG+/ldgxPagEwF9tCeQMuX/Sr0ari2v1LSWCKV7wRCeCTavT4vCjimyaqVnuvuE s9yHzyLcX+1aZvlmgl53O8AaqbepqqC84VuZagLgvYjxj2nSwGgfcmCgga/xfcc1yRVS YKAdqIf5ZDK7VgNxWJKl1MSTSRUnYNNPOs+RRplyPXyHIi02Nk2Idz+s631Lt+NhH0/5 qRuMoDqYbuFSuMXUNqu+dBLhMOL2er65Wl8fQXFJqRhnYzRZBcz60yqBdnkCkSyqf+MC svfstqhORWDNg41Uzqb0gjxQ3lVVMn9DFS8aNyFMJn4eqDv0QHCgr8auIvWxAkzxIjFm q2jg== 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=bw0GoEY51WqystaQVYSMUkeTK10yIv0eL0dfTPHrTz6Uy5bOw68IF0llD5I+i3rkKs Na+25ubFVmrPpk/wzrrSo1sjYm7QbC8sT4+aS9P/ShEB+777H00XQy+Naar5gSAOSDTU MaC2bAD/RvXxtAV6QjuNJQHw7ETKNGaQQNJjVWHhpX8YVPErvd2GBGNBUYLshPTR74/y o5tMlIwqFyxoAcZ8JW9ml5ArLM8MSkLt3cSzw5oCxAIqjwRhq0ofGeLQNbFYJdSwbGSo havG1sAdnzkx5R9l+2qgkxTyMWkOLiwUoJHniP+VmIx1+a8xgMtBXhGuIsK4NAyu9JOk iZbQ== X-Gm-Message-State: ACrzQf0HHJQSKlKomBVSmU78DICdQ6OXC+ftZeEJXQKJK9qw3fmTwevV M1aB7OMPv0jaqd2lnddShqI= X-Received: by 2002:a17:907:3186:b0:777:3fe7:4659 with SMTP id xe6-20020a170907318600b007773fe74659mr3747536ejb.336.1666122729204; Tue, 18 Oct 2022 12:52:09 -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 r1-20020a1709061ba100b0072a881b21d8sm7945858ejg.119.2022.10.18.12.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 12:52:08 -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 v2 4/4] io_uring/rw: enable bio caches for IRQ rw Date: Tue, 18 Oct 2022 20:50:58 +0100 Message-Id: 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