Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2494123pxb; Sat, 25 Sep 2021 08:49:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUZePstPw9FUEcKgQYE8yqb3Sjsber3kEsmxHeBlxlN1143HPxjU4qcAOBcvHlyzHQysbx X-Received: by 2002:a92:cd09:: with SMTP id z9mr13545108iln.50.1632584945735; Sat, 25 Sep 2021 08:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632584945; cv=none; d=google.com; s=arc-20160816; b=sz19uDyUJDeedKoNTEMs62YEYzbO0RA0Ra30/dtmQ5Qfz5rpzOxrGAt/QXP5mElDfK QImp1dXBkj5pwLBCSdcieruigrAK+gOHQfl9cmtqbc86LE0I/kSSn5ODm7yk2RzsV9TR lWfSZK1UFjbKB1bBipNbmgg7Vm0YWC7n1ueCujFT9RCBEYB4fdKff0GgBmZpBvU8z/ba VrWauf9OgMARpbTpIfcl+XINl3gJjuqqYXSjyoguI6YRKXKibDM3J0QFQasOX6ItrHF9 dTe0R8zfKBHAG1JClzx83GgNf6uYjbYPxH7mRHQA9ZzXuD8Ml5sHnrS4llfVFhHZLmrp B5JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=rLKZok9/4QFXX13m/PZ+MsuZ2LJ/FPI7EhWhls6THyQ=; b=MkIw/LGezMyDO3TSSl/QS6MPT+t22FghzNFrGgFleB/+tva8t666Rq5ZZYwJwFZ/si 5pYWqDdDlvg9ioFhdwv2EmfkVHMvcp4zqdm/ofZemo9Gndt0HxC/l1h/8E/joFtGEua8 rxZhxWrgL/yE3ntkjI1eIBZUBGjhlQmXA1GRJJDaVRePeQYWf0yH2SEHRezrab8K6K8J KMCK4llfyIzkhVcuq1KZhi9X7WEpBGYEv4xeBBruSPJmR8/xDteEFP/9wgCowlkvkWKN qS6eES693znLld6bwsZEcRudyrL4MxDLDMeQkptBzf5pXzcDAR8bAJGpxZS+mWK08/NS mu5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zp3fL40T; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si14224937ila.10.2021.09.25.08.48.35; Sat, 25 Sep 2021 08:49:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zp3fL40T; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237702AbhIYPi2 (ORCPT + 99 others); Sat, 25 Sep 2021 11:38:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43100 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbhIYPi2 (ORCPT ); Sat, 25 Sep 2021 11:38:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632584212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rLKZok9/4QFXX13m/PZ+MsuZ2LJ/FPI7EhWhls6THyQ=; b=Zp3fL40T/LsUcWbwhjvp5mMn+uOm9bmAmS1VR0tSVyTFVY9Y3pTJJ5dj+GgfkuoHULGVFS s4PKZMMRdAsjYC0gmFX7VQ0n1bV7HlpAcK+GPGSChhDSz0bDcb7Fn+PaLo8AgXpXglbf+P F0hqpRtvfHZkRQs2xFkSIEXR7q++70w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-dHhCQ_9FN4ypFdInzvUEcA-1; Sat, 25 Sep 2021 11:36:50 -0400 X-MC-Unique: dHhCQ_9FN4ypFdInzvUEcA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A7CC814270; Sat, 25 Sep 2021 15:36:48 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id A401D1000358; Sat, 25 Sep 2021 15:36:42 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <163250387273.2330363.13240781819520072222.stgit@warthog.procyon.org.uk> <163250396319.2330363.10564506508011638258.stgit@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, hch@lst.de, trond.myklebust@primarydata.com, Jens Axboe , "Darrick J. Wong" , linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, darrick.wong@oracle.com, viro@zeniv.linux.org.uk, jlayton@kernel.org, torvalds@linux-foundation.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 9/9] mm: Remove swap BIO paths and only use DIO paths MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2396105.1632584202.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Sat, 25 Sep 2021 16:36:42 +0100 Message-ID: <2396106.1632584202@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Matthew Wilcox wrote: > On Fri, Sep 24, 2021 at 06:19:23PM +0100, David Howells wrote: > > Delete the BIO-generating swap read/write paths and always use ->swap_= rw(). > > This puts the mapping layer in the filesystem. > = > Is SWP_FS_OPS now unused after this patch? Ummm. Interesting question - it's only used in swap_set_page_dirty(): int swap_set_page_dirty(struct page *page) { struct swap_info_struct *sis =3D page_swap_info(page); if (data_race(sis->flags & SWP_FS_OPS)) { struct address_space *mapping =3D sis->swap_file->f_mapping; VM_BUG_ON_PAGE(!PageSwapCache(page), page); return mapping->a_ops->set_page_dirty(page); } else { return __set_page_dirty_no_writeback(page); } } > Also, do we still need ->swap_activate and ->swap_deactivate? f2fs does quite a lot of work in its ->swap_activate(), as does btrfs. I'= m not sure how necessary it is. cifs looks like it intends to use it, but i= t's not fully implemented yet. zonefs and nfs do some checking, including hol= e checking in nfs's case. nfs also does some setting up for the sunrpc transport. btrfs, cifs, f2fs and nfs all supply ->swap_deactivate() to undo the effec= ts of the activation. David