linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	intel-gfx@lists.freedesktop.org, linux-mm@kvack.org,
	dri-devel@lists.freedesktop.org, stable@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	v9fs@lists.linux.dev
Subject: [PATCH v2 1/9] 9p: Add a migrate_folio method
Date: Wed,  2 Apr 2025 15:59:55 +0100	[thread overview]
Message-ID: <20250402150005.2309458-2-willy@infradead.org> (raw)
In-Reply-To: <20250402150005.2309458-1-willy@infradead.org>

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 <dhowells@redhat.com>
Cc: v9fs@lists.linux.dev
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 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,
 };
-- 
2.47.2


  reply	other threads:[~2025-04-02 15:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 14:59 [PATCH v2 0/9] Remove aops->writepage Matthew Wilcox (Oracle)
2025-04-02 14:59 ` Matthew Wilcox (Oracle) [this message]
2025-04-03  3:46   ` [PATCH v2 1/9] 9p: Add a migrate_folio method Dominique Martinet
2025-04-03  3:53     ` Matthew Wilcox
2025-04-02 14:59 ` [PATCH v2 2/9] vboxsf: Convert to writepages Matthew Wilcox (Oracle)
2025-04-02 14:59 ` [PATCH v2 3/9] migrate: Remove call to ->writepage Matthew Wilcox (Oracle)
2025-04-05 16:56   ` Zi Yan
2025-04-02 14:59 ` [PATCH v2 4/9] writeback: Remove writeback_use_writepage() Matthew Wilcox (Oracle)
2025-04-02 14:59 ` [PATCH v2 5/9] shmem: Add shmem_writeout() Matthew Wilcox (Oracle)
2025-04-02 15:00 ` [PATCH v2 6/9] i915: Use writeback_iter() Matthew Wilcox (Oracle)
2025-04-04  8:26   ` Christoph Hellwig
2025-04-04 13:40     ` Matthew Wilcox
2025-04-02 15:00 ` [PATCH v2 7/9] ttm: Call shmem_writeout() from ttm_backup_backup_page() Matthew Wilcox (Oracle)
2025-04-02 15:00 ` [PATCH v2 8/9] mm: Remove swap_writepage() and shmem_writepage() Matthew Wilcox (Oracle)
2025-04-02 15:00 ` [PATCH v2 9/9] fs: Remove aops->writepage Matthew Wilcox (Oracle)
2025-04-02 17:10 ` [PATCH v2 1/9] 9p: Add a migrate_folio method David Howells
2025-04-04  8:31 ` [PATCH v2 0/9] Remove aops->writepage Christoph Hellwig
2025-04-04 13:42   ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250402150005.2309458-2-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=stable@vger.kernel.org \
    --cc=v9fs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).