Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4027271rwl; Sat, 7 Jan 2023 09:43:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXuG3H3++qGlBy+lUrC821FjraP1smXy1BeRx7cfYNOgsNMnbiPFn3kI2NbrMh6FKVv9qcYd X-Received: by 2002:a05:6a20:7b13:b0:af:80bb:1483 with SMTP id s19-20020a056a207b1300b000af80bb1483mr66096567pzh.55.1673113390942; Sat, 07 Jan 2023 09:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673113390; cv=none; d=google.com; s=arc-20160816; b=Er9rQBwTWLVWLOjiyKBPCYi13gha7seUen3Uss5p4xiKFHxhsbmCKitD+OwpmKSNCh TwwbNpSof3qG5w/nH9UOWNapFS1kIMBN0Es1GVHduvpedkTCnMIKBwX0SMQa6wZnbjv4 7zqMjRTRS83WIjEs9z/jJa4al2++erVbkvI/DLoPlJTMDPVTdcQJs3wxuIpYDVVjXxR8 VJAd9y/Q+kKndoV3nXq8aDmG2tNWTjgf9tqGHN2j6UqG1xLzSr22sw1gccYL0O2dUYl4 0GFfUlBnO+sVQgxfKKWBncDvZgNmOhUcJ2VpP+kWYU12DTeWKqeweqQtlgVvhmG4t47s FwJw== 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 :message-id:date:subject:to:from:dkim-signature; bh=Hu+KrHAvK2Lx4VUA2/5XGGw5+FMsGd6waUFptsRopws=; b=f8IJw8uXjvr+Sw1JsqJSHgzswJUjGlkThwtuXTlQNN3kUZzJfkWiCg8uwZ+LQUXwSO yoEwdfFpnibX1Qjp9TTYU5i01EdTGcq3d/AnO8XYyEsj1yen4RdZWJu1VNqmmFQSnXbH 3L0q3iAUF0G/xOkOrBxoyaG9ZcQO+mXrt5Ddq3KBoFpI9jBairhwWqE16UuJgsxb1LOH c9HtH7i4ZK3jdbeIxCC6yGfcED2MUKzU73VaL7+qnqJqg22jW4byOCO80XqNQe1yqbXU VuWJ7q7dMyF1iwvPb5U4JEHlGhsYBlqDTmTjXpm73P402rWKwgckAeofF4UhW/EZQx9b dyrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8RR2Ig1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m21-20020a056a00081500b00580eef1f714si4640004pfk.265.2023.01.07.09.42.51; Sat, 07 Jan 2023 09:43:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernel.org header.s=k20201202 header.b=N8RR2Ig1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232416AbjAGRmK (ORCPT + 99 others); Sat, 7 Jan 2023 12:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232377AbjAGRmK (ORCPT ); Sat, 7 Jan 2023 12:42:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421F12DF for ; Sat, 7 Jan 2023 09:42:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BF4160B2D for ; Sat, 7 Jan 2023 17:42:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A83DC433EF for ; Sat, 7 Jan 2023 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673113327; bh=FPm1vM9BvrPwnLHPktxilREge4NcfKsqJqIjLJfbLwo=; h=From:To:Subject:Date:From; b=N8RR2Ig1vEyg3R9O6yG8mkisGayfOurJYgmft30EuLxyZzVwhsxBAaEpRoVGhyhRR 6FKRQi4k1HnXL6fzXlBMkMdREpR08y61CNs8PKRMCGllebvJ9XFbGylwqItcSftlP4 wD39jn2n3sG3fC1y1kuFPBbQQq40+PDZ89XUi2NGntvHfSlFOYh/4ELBPKLvcgYhzr A2cXCVxJLjpenfFhEc8n0VXXqKKQVdw/8mjqE9UP6uLhMIF+0JxVWWHHyrHshAKxKE +5SE0VgoaFBDbPaymo/ux0luROTUd7rDeTrGV3sGo/du0fR1V/ZlAT2p0c2lqaZSUh CrVSe9pMiPmmw== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 00/17] Initial conversion of NFS basic I/O to use folios Date: Sat, 7 Jan 2023 12:36:18 -0500 Message-Id: <20230107173635.2025233-1-trondmy@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-nfs@vger.kernel.org From: Trond Myklebust This set of patches represents an initial effort to convert the page cache I/O in the NFS client to use native folio functionality. It should allow the nfs_page structs and their helpers to carry folios (including folios of order > 0) and to pass their data contents through to the RPC layer. Note that because O_DIRECT uses pages, we still need to support the traditional page based I/O, and so the new struct nfs_page will carry both types. I did not touch the fscache code, but I expect that to be able to continue to work with order 0 folios. The plan is to merge this functionality with order 0 folios first, in order to catch any regressions in existing functionality. Then we can enable order n > 0 once we're happy about the stability (at least for the non-fscache case). At this point, the xfstests are all passing without any regressions on my setup, so I'm throwing the patches over the fence to allow for wider testing. Please make sure, in particular to test pNFS if your server supports it. I didn't have to make any changes to the pNFS code, and I don't expect any trouble, but it would be good to have validation of that assumption. Trond Myklebust (17): NFS: Fix for xfstests generic/208 NFS: Add basic functionality for tracking folios in struct nfs_page NFS: Support folios in nfs_generic_pgio() NFS: Fix nfs_coalesce_size() to work with folios NFS: Add a helper to convert a struct nfs_page into an inode NFS: Convert the remaining pagelist helper functions to support folios NFS: Add a helper nfs_wb_folio() NFS: Convert buffered reads to use folios NFS: Convert the function nfs_wb_page() to use folios NFS: Convert buffered writes to use folios NFS: Remove unused function nfs_wb_page() NFS: Convert nfs_write_begin/end to use folios NFS: Fix up nfs_vm_page_mkwrite() for folios NFS: Clean up O_DIRECT request allocation NFS: fix up nfs_release_folio() to try to release the page NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio() NFS: Improve tracing of nfs_wb_folio() fs/nfs/direct.c | 12 +- fs/nfs/file.c | 124 +++++++------ fs/nfs/internal.h | 38 ++-- fs/nfs/nfstrace.h | 58 ++++-- fs/nfs/pagelist.c | 217 +++++++++++++++++----- fs/nfs/pnfs.h | 10 +- fs/nfs/pnfs_nfs.c | 18 +- fs/nfs/read.c | 86 +++++---- fs/nfs/write.c | 380 ++++++++++++++++++++------------------- include/linux/nfs_fs.h | 7 +- include/linux/nfs_page.h | 79 +++++++- 11 files changed, 645 insertions(+), 384 deletions(-) -- 2.39.0