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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7829DC4320E for ; Thu, 12 Aug 2021 12:18:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D1D5560FD7 for ; Thu, 12 Aug 2021 12:18:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D1D5560FD7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2C9358D0006; Thu, 12 Aug 2021 08:18:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 279478D0002; Thu, 12 Aug 2021 08:18:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 168888D0006; Thu, 12 Aug 2021 08:18:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id EEB658D0002 for ; Thu, 12 Aug 2021 08:18:38 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7AD0D252D4 for ; Thu, 12 Aug 2021 12:18:38 +0000 (UTC) X-FDA: 78466331916.05.DF089DA Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf02.hostedemail.com (Postfix) with ESMTP id B33DB7009EC6 for ; Thu, 12 Aug 2021 12:18:37 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 3603667373; Thu, 12 Aug 2021 14:18:34 +0200 (CEST) Date: Thu, 12 Aug 2021 14:18:34 +0200 From: Christoph Hellwig To: David Howells Cc: willy@infradead.org, trond.myklebust@primarydata.com, darrick.wong@oracle.com, hch@lst.de, jlayton@kernel.org, sfrench@samba.org, torvalds@linux-foundation.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] mm: Fix NFS swapfiles and use DIO read for swapfiles Message-ID: <20210812121834.GA18532@lst.de> References: <162876946134.3068428.15475611190876694695.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162876946134.3068428.15475611190876694695.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B33DB7009EC6 X-Stat-Signature: z4m33kkntrmrefzee84shkojq1nsw6xz Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=none (imf02.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-HE-Tag: 1628770717-241822 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: On Thu, Aug 12, 2021 at 12:57:41PM +0100, David Howells wrote: > > Hi Willy, Trond, > > Here's a change to make reads from the swapfile use async DIO rather than > readpage(), as requested by Willy. > > Whilst trying to make this work, I found that NFS's support for swapfiles > seems to have been non-functional since Aug 2019 (I think), so the first > patch fixes that. Question is: do we actually *want* to keep this > functionality, given that it seems that no one's tested it with an upstream > kernel in the last couple of years? Independ of the NFS use using the direct I/O code for swap seems like the right thing to do in generlal. e.g. for XFS a lookup in the extent btree will be more efficient than the weird swap extent map.