Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1277945pxb; Tue, 29 Mar 2022 22:56:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE1+yv08OMNKQRD5ktjTcEdwlFS3Ysu4HTYNzGz1RZwAPtEpwDfAc9EknLxAxPeYTWzabc X-Received: by 2002:a05:6402:4302:b0:419:4be8:6493 with SMTP id m2-20020a056402430200b004194be86493mr8791533edc.294.1648619788654; Tue, 29 Mar 2022 22:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648619788; cv=none; d=google.com; s=arc-20160816; b=r37axukOKXbyjNr1+PUKNU5MHkNX4J+d4OkWQAzWPl2A+FYxxzyvPO7Hhhwq6ngYIm MwLpkxKhqJ0G18rAO23fYYhilmpIty3GUjl/BoHV7vGfKqhQIOsWVp+kBlUFXVuZXCM6 Ui3vrT//p9Pa7SXfciKCDlyShFNMrGhj+Jmy62s4w9nXxkhnRvIm0IKLtWkFYUkJcnip 9d3yaL5Mi585fdop5R15/V5aISuAsWpFJykFRKYtDY24NAvc7471tJKwRV977Hu5KY/E 08c3j5SfeeCZLXslD91COHUu0VsfPlN/Eenm7mnPdjSl0ApIlebOYGS0pTUyLiF1YWf4 N1dg== 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:message-id:date:cc:to:from:subject:dkim-signature :dkim-signature; bh=decwXtYK4xzf9z+YJq9kZIT8RF7eJZEH+v+/UIEpIs0=; b=phJAZzWteJ4RPoz/JnIkRSOI2zH4CiB4Q5XfKw1cydjdR2UKGhwQFf6iVspTZ3pPLj q9uvlWoB7wPxWIQqzuKKgdxTySoDUKLVzPQiW4Oyyv/U56P0tp41NsKY8FXAGi5bqU8G ZY8MAWsf8T8Fbp0Cz7TyaqOCLIQfe/T6Hi2C8w70+9WcrrYHpWS+rhnm2VAegINChDnK dLZOu9Mx3d9pN4xFZ5Bqt1nt4Oyebavr7KcAuwnFlaDU4Dp0TRPO+eFqvzmwoNfJUcTg ICRT2y7tRunp/XxKZ7FrK2aBY6QOxF2qIQ7iQC94aIF0XxPH8+Dym7CB2b8fB+Ce78p1 EZtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gIlals8T; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a50d092000000b00418c2b5bf7csi20178839edd.606.2022.03.29.22.55.55; Tue, 29 Mar 2022 22:56:28 -0700 (PDT) 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=@suse.de header.s=susede2_rsa header.b=gIlals8T; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241194AbiC2XxG (ORCPT + 99 others); Tue, 29 Mar 2022 19:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241227AbiC2XxA (ORCPT ); Tue, 29 Mar 2022 19:53:00 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA0E11CAF14; Tue, 29 Mar 2022 16:51:15 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 64FEC1F37B; Tue, 29 Mar 2022 23:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1648597874; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=decwXtYK4xzf9z+YJq9kZIT8RF7eJZEH+v+/UIEpIs0=; b=gIlals8TlB5yctjTv9aD0cnYjD5k+Z3UK4jKAFB9nKXC2iWqPABcPBOBg/Kq12vS0dHNym ZvqMi5c0BDJqW6tnJz0/0h3/c++bM+JN9onMMUO98A0/fYuNG77UqOAuJm+79FANKppCrL KSYerLOwkBAWGWWT+u2XCxNfUCxukeE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1648597874; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=decwXtYK4xzf9z+YJq9kZIT8RF7eJZEH+v+/UIEpIs0=; b=oZLW8JZWx9ZEKj2ved76aCXNp4XaZHcDloX0gXO0FFuNXj9vIjOpVdlfSPB/uUG6xIVVcZ +VSqHzJJz1AbC2Bg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6BFCF13A7E; Tue, 29 Mar 2022 23:51:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hZv0CXCbQ2IcLwAAMHmgww (envelope-from ); Tue, 29 Mar 2022 23:51:12 +0000 Subject: [PATCH 00/10] MM changes to improve swap-over-NFS support From: NeilBrown To: Andrew Morton Cc: Christoph Hellwig , David Howells , linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Wed, 30 Mar 2022 10:49:41 +1100 Message-ID: <164859751830.29473.5309689752169286816.stgit@noble.brown> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Assorted improvements for swap-via-filesystem. This is a resend of these patches, rebased on current HEAD. The only substantial changes is that swap_dirty_folio has replaced swap_set_page_dirty. Currently swap-via-fs (SWP_FS_OPS) doesn't work for any filesystem. It has previously worked for NFS but that broke a few releases back. This series changes to use a new ->swap_rw rather than ->readpage and ->direct_IO. It also makes other improvements. There is a companion series already in linux-next which fixes various issues with NFS. Once both series land, a final patch is needed which changes NFS over to use ->swap_rw. Thanks, NeilBrown --- NeilBrown (10): MM: create new mm/swap.h header file. MM: drop swap_dirty_folio MM: move responsibility for setting SWP_FS_OPS to ->swap_activate MM: reclaim mustn't enter FS for SWP_FS_OPS swap-space MM: introduce ->swap_rw and use it for reads from SWP_FS_OPS swap-space MM: perform async writes to SWP_FS_OPS swap-space using ->swap_rw DOC: update documentation for swap_activate and swap_rw MM: submit multipage reads for SWP_FS_OPS swap-space MM: submit multipage write for SWP_FS_OPS swap-space VFS: Add FMODE_CAN_ODIRECT file flag Documentation/filesystems/locking.rst | 18 +- Documentation/filesystems/vfs.rst | 17 +- drivers/block/loop.c | 4 +- fs/cifs/file.c | 7 +- fs/fcntl.c | 9 +- fs/nfs/file.c | 20 ++- fs/open.c | 9 +- fs/overlayfs/file.c | 13 +- include/linux/fs.h | 4 + include/linux/swap.h | 7 +- include/linux/writeback.h | 7 + mm/madvise.c | 8 +- mm/memory.c | 2 +- mm/page_io.c | 247 +++++++++++++++++++------- mm/swap.h | 30 +++- mm/swap_state.c | 22 ++- mm/swapfile.c | 13 +- mm/vmscan.c | 38 ++-- 18 files changed, 347 insertions(+), 128 deletions(-) -- Signature