From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 721CFC433EF for ; Mon, 7 Feb 2022 17:56:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 001A36B0074; Mon, 7 Feb 2022 12:56:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF3F66B0075; Mon, 7 Feb 2022 12:56:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBBE56B0078; Mon, 7 Feb 2022 12:56:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id C978C6B0074 for ; Mon, 7 Feb 2022 12:56:02 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8EA3E97304 for ; Mon, 7 Feb 2022 17:56:02 +0000 (UTC) X-FDA: 79116737364.17.652B0C2 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by imf19.hostedemail.com (Postfix) with ESMTP id 1BCF71A0003 for ; Mon, 7 Feb 2022 17:56:01 +0000 (UTC) Received: by mail-vs1-f54.google.com with SMTP id r20so521491vsn.0 for ; Mon, 07 Feb 2022 09:56:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q2jFTN2u074XzT8suGCUZz+zCtO41192wV4ApDRi8Ns=; b=DJgwMIMINmTImn3+WXcqni7vQ+rnAvwm30nen/CX6NT84uWpdsbkk/VnP0wSDqOmH7 pqDJavUAxKKwQ21y53m0boDiiDOD8TyZdLKT3LIp71KMV7eSXmlYTam/+65lND2Psf9k HnJRuWgFtfSBQ5PwQS+Ct6Gc41PSdl4Z6Cq8DK0mohrOZGB4kYaPqub3zgEXaisoenFD lYYtVVe5XEc8sBXgTCRfe0uT68JOgUaVx4qiISmDsr/oQEltrSv+3NsQWfSyHNkh0ZA8 o0FdR2vKJ1pLybKyGsXIqgO2r4XaNb/OgHt+qEOISyTDnGiZRQhhniToa0GbiPZlzD+I HTow== X-Gm-Message-State: AOAM533zWeGlPv1w4Rz4tvJlFhboWYE9rqEUymQfc/T2GCbS3P4uELaE lNnEbiMEYO4m6C8RP0X8RJK/VW/XXHw1zA== X-Google-Smtp-Source: ABdhPJyqVQbt2uHGg+/0uGkBR8WrljDVYKZHLBb9v5Vsr/AuCj1djxsRTUtTrAvYapTe6MixNQ0sbA== X-Received: by 2002:a67:a24e:: with SMTP id t14mr342834vsh.17.1644256561088; Mon, 07 Feb 2022 09:56:01 -0800 (PST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com. [209.85.217.48]) by smtp.gmail.com with ESMTPSA id d187sm2405425vke.14.2022.02.07.09.55.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Feb 2022 09:56:00 -0800 (PST) Received: by mail-vs1-f48.google.com with SMTP id t184so524287vst.13 for ; Mon, 07 Feb 2022 09:55:59 -0800 (PST) X-Received: by 2002:a67:a401:: with SMTP id n1mr161631vse.38.1644256559395; Mon, 07 Feb 2022 09:55:59 -0800 (PST) MIME-Version: 1.0 References: <164299573337.26253.7538614611220034049.stgit@noble.brown> In-Reply-To: <164299573337.26253.7538614611220034049.stgit@noble.brown> From: Geert Uytterhoeven Date: Mon, 7 Feb 2022 18:55:48 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/23 V3] Repair SWAP-over_NFS To: NeilBrown Cc: Trond Myklebust , Anna Schumaker , Chuck Lever , Andrew Morton , Mel Gorman , Christoph Hellwig , David Howells , "open list:NFS, SUNRPC, AND..." , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 1BCF71A0003 X-Rspam-User: nil Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.217.54 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com X-Stat-Signature: oz7cctewyj4fzhurotugsujcsw9dff9w X-HE-Tag: 1644256561-647841 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Neil, On Mon, Jan 24, 2022 at 5:40 PM NeilBrown wrote: > swap-over-NFS currently has a variety of problems. > > swap writes call generic_write_checks(), which always fails on a swap > file, so it completely fails. > Even without this, various deadlocks are possible - largely due to > improvements in NFS memory allocation (using NOFS instead of ATOMIC) > which weren't tested against swap-out. > > NFS is the only filesystem that has supported fs-based swap IO, and it > hasn't worked for several releases, so now is a convenient time to clean > up the swap-via-filesystem interfaces - we cannot break anything ! > > So the first few patches here clean up and improve various parts of the > swap-via-filesystem code. ->activate_swap() is given a cleaner > interface, a new ->swap_rw is introduced instead of burdening > ->direct_IO, etc. > > Current swap-to-filesystem code only ever submits single-page reads and > writes. These patches change that to allow multi-page IO when adjacent > requests are submitted. Writes are also changed to be async rather than > sync. This substantially speeds up write throughput for swap-over-NFS. > > Some of the NFS patches can land independently of the MM patches. A few > require the MM patches to land first. Thanks for your series! Swap over NFS was indeed broken last time I tried[1], but with your series, it's working again on arm32 (RZ/A1 with 32 MiB of RAM, 100Mbps Ethernet and Debian 9 nfsroot). My system was exercised using "apt update", and the subsequent "apt upgrade" is still running, though (it took more than 6 hours to build the apt dependency tree, now it's trying hard to create a list of packages...). Tested-by: Geert Uytterhoeven BTW, I think you do want to run scripts/checkpatch.pl on your series, and improve it by fixing a few of the reported warnings (function definition arguments should also have an identifier name, missing data_race() comment, missing SPDX-License-Identifier tag). [1] https://lore.kernel.org/all/20191230153238.29878-1-geert+renesas@glider.be/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds