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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4B32FC4338F for ; Thu, 12 Aug 2021 20:13:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E274760FD7 for ; Thu, 12 Aug 2021 20:13:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E274760FD7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3E2CE8D0002; Thu, 12 Aug 2021 16:13:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 393958D0001; Thu, 12 Aug 2021 16:13:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2829B8D0002; Thu, 12 Aug 2021 16:13:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 0F4578D0001 for ; Thu, 12 Aug 2021 16:13:24 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B73D881602CA for ; Thu, 12 Aug 2021 20:13:23 +0000 (UTC) X-FDA: 78467528286.13.C394F65 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf09.hostedemail.com (Postfix) with ESMTP id 5004730096DC for ; Thu, 12 Aug 2021 20:13:23 +0000 (UTC) Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 17CKD6OY003112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Aug 2021 16:13:07 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id C8CEF15C37C1; Thu, 12 Aug 2021 16:13:06 -0400 (EDT) Date: Thu, 12 Aug 2021 16:13:06 -0400 From: "Theodore Ts'o" To: Matthew Wilcox Cc: "Darrick J. Wong" , Christoph Hellwig , David Howells , trond.myklebust@primarydata.com, darrick.wong@oracle.com, 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 2/2] mm: Make swap_readpage() for SWP_FS_OPS use ->direct_IO() not ->readpage() Message-ID: References: <20210812122104.GB18532@lst.de> <162876946134.3068428.15475611190876694695.stgit@warthog.procyon.org.uk> <162876947840.3068428.12591293664586646085.stgit@warthog.procyon.org.uk> <3085432.1628773025@warthog.procyon.org.uk> <20210812170233.GA4987@lst.de> <20210812174818.GK3601405@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5004730096DC X-Stat-Signature: 8odjnwwt7yk6qaw5eow6wqjq4jkedb54 Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=none; spf=none (imf09.hostedemail.com: domain of tytso@mit.edu has no SPF policy when checking 18.9.28.11) smtp.mailfrom=tytso@mit.edu X-HE-Tag: 1628799203-714775 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000055, 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 07:14:37PM +0100, Matthew Wilcox wrote: > > Well ... this would actually allow the filesystem to break COWs and > allocate new blocks for holes. Maybe you don't want to be doing that > in a low-memory situation though ;-) I'm not sure the benefits are worth the costs. You'd have to handle ENOSPC errors, and it would require some kind of metadata journal transaction, which could potentially block for any number of reasons (not just due to memory allocations, but because you're waiting for a journal commit to complete). As you say, doing that in a low-memory situation seems to be unneeded complexity. - Ted