From patchwork Wed Apr 2 14:59:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 14036138 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 399BCC28B20 for ; Wed, 2 Apr 2025 15:00:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32FDD280009; Wed, 2 Apr 2025 11:00:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26953280001; Wed, 2 Apr 2025 11:00:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EEE1E280009; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AA241280001 for ; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6B492C1A38 for ; Wed, 2 Apr 2025 15:00:12 +0000 (UTC) X-FDA: 83289414264.08.3CF838A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id B96938001F for ; Wed, 2 Apr 2025 15:00:10 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DFlhRkJZ; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743606010; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H/LzOSBZMJnPa9n+hJhMKcetVnuAU/qb1xOh1kNA3po=; b=UKAG6KQ98+cZHFOz7ixjcuQuFhRflSHBidbXxbD5oXBQ8TXM8/glRXnnFYHb7aU4eCsCCC 1HZfC3nUCDdhFnvV9ExsKLZ/QmSYAHACS1aPTPQNPF9x9Z9OpPTxRlX78ydsRCTwCyrWin 9T6ubc9b/YCTCkb8yuUEGSvWTLvVcjA= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DFlhRkJZ; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743606010; a=rsa-sha256; cv=none; b=uxk8ZJHOHy75/X9iX83EM6sTCT3JubcBQoKP6YiDlDtOqN/4oaLN5Q9hFq2meCb7fKMmMI RNTD9SU+UQ+sskXhGgrEAFzedqgd6iwo1+rf3X2LGw2S3AJCcSoV+QVMkwbmd24jDK1/GH KRXaBL3/zyHkui5NMqVNDnIVW1SSF1Q= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=H/LzOSBZMJnPa9n+hJhMKcetVnuAU/qb1xOh1kNA3po=; b=DFlhRkJZvk0FxUhTFpLMVcqGW6 xG1V3XXL/3wXAn/c2FOYw2EQMYqW/olCsErvNjPUKfLGXt+KADdT2YskzUX3BUzbnyAagDDYzB/fm ZR4Q9IpNbzkJL3GnwtfzS0XcEfD/32j2Dfmitv5ap5a8XrmQ8JcS7Kf2QXPDc3sqfLLqaVqVAynw3 SVXXASaClM2+3ASDNUleyBPQi3HXCWxVaxx8xZiTEgWj5/FavNMrcjK/FGXAxKgWhUbSiBa86JP8X ULsI58AmQLxczl1eK++kle8TpZzr4ssoKT0HwbiRLd+lve1N9BIfdY9N8jDECSQ2yYLh8qLlIA9Mb nT2UhlgQ==; Received: from willy by casper.infradead.org with local (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzzZX-00000009gs7-0PTo; Wed, 02 Apr 2025 15:00:07 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , intel-gfx@lists.freedesktop.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, stable@vger.kernel.org, David Howells , v9fs@lists.linux.dev Subject: [PATCH v2 1/9] 9p: Add a migrate_folio method Date: Wed, 2 Apr 2025 15:59:55 +0100 Message-ID: <20250402150005.2309458-2-willy@infradead.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250402150005.2309458-1-willy@infradead.org> References: <20250402150005.2309458-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: B96938001F X-Stat-Signature: tw43pzdpubdub8fr1jqujgsibg13z41t X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1743606010-429474 X-HE-Meta: U2FsdGVkX19b3SNoMJysE1Tfw66lEdKnVzELc03OZrR6NSKQYRJ7ZA3Dtwa+XbvIbZ5cJ+AgXVPOUe7symNOLo1z/UvBvdDCbztC68mK2Ds85M4PV+5JrLt9VMTmE9sqNsOGCgC+4+0xYk9ncLt2HDOR8BKk6pRBdvzTsAolmXEVKKuhCKooCahooUAwJXlfPfBcZ8of/fSLjKRmLsJosXAVENu2Eo+xGIJvxVSMxCBEdz6S/W7EBi73qNqBzHI9tV+j2UtX4K6WSmQ+4vdXluEGndnTgXMhNcHRIaRenoMm4wfGe9ICqZFI0dNFnI7LmGpJC/YBkLy6Ia/2W63UPvgllftP9qeiWENJnhPz8TF6tUu4zh9fAztaI/oMV+e4Eo6wDFU2tD4AYmwgsfXyGeVPjHJMH4z9qfR9Rg54xYYi1euglSuBFsVG5k0KB7hCgVnHZA95DXUsEIv8hbm2iWX4GvrMPgnkRkVdljzGJbSjQBHfvFeWqiYv6ecGvzR/D+xNv0S88r0zUu9kztjU36bt70YCUbJ8PKVpmtdp+oEqtj+2bC1xOGk7u8+ptKI5fClBO8Tvns2IwlcMkrCx8b6DkFKV/QdrDRkNgYtF363fyn0nUmaZq1qtORm8Gl4zf2Nx3X1ag5uRm5TWKxztlep364P72P91p1BZy26Cq8QH06rcSyJLOxuF4Y+ekrpFlePCNTDbIxrbKRHP6+hQp2szG/F5aeFyXg/c5xwRRgFWydChSqKfpfp3SaGXmq9bexqQQa6ioIC6jZuMb/YjvOJRxdh1F4IVlA3iukd5Zm3PsjZZjr8Ve/GFR7Vzj6NtOv1tGkMbM3etqBTByaqXf375+IhjH95BtU8g88nr4hF24GZExyAtuqaqGgs0simdq2z9n6gKLcIbsramdYPx4tsYmVxpSnnq+GcJP1SiwcXEZGxbmnNQdHzBP9mUWFrttnh13vl5qBE6F0yJfHq tQExmHEF 15bH3t+kQJF/+sCQ4lnRNR/fNegZNvlpoXP/82SXRGhWBw3tsVNNJVY4kzQJNeoltoxxxTBvogHHwFU/EUvmoM4NFDiX8Q1Q4jQ9oMJosFdAfmyYRwlnkmNkMUsI0mywGSYZtJqzSQnEVYqsmlu9X8I0Iuq2OqvgLEvd5qIIY6MOeA0piYSQA2JMBWguir7WtDUZPIHPCOZN+E1bCw1fY0/K+lPmMXZkJ8b01XCIlGHvQr9NcEphoonauRFSKUE4wj1D75nT2HxolrnjYig2C4z4Rs9d/3n7yYqu0I2EbYUI4CSRA96Lp4fTGsidyK1wrMFKh2p4bQ/CUiTQ= 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: List-Subscribe: List-Unsubscribe: The migration code used to be able to migrate dirty 9p folios by writing them back using writepage. When the writepage method was removed, we neglected to add a migrate_folio method, which means that dirty 9p folios have been unmovable ever since. This reduced our success at defragmenting memory on machines which use 9p heavily. Fixes: 80105ed2fd27 (9p: Use netfslib read/write_iter) Cc: stable@vger.kernel.org Cc: David Howells Cc: v9fs@lists.linux.dev Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Howells Acked-by: Dominique Martinet --- fs/9p/vfs_addr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index 32619d146cbc..1286d96a29bc 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c @@ -164,4 +164,5 @@ const struct address_space_operations v9fs_addr_operations = { .invalidate_folio = netfs_invalidate_folio, .direct_IO = noop_direct_IO, .writepages = netfs_writepages, + .migrate_folio = filemap_migrate_folio, };