From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Shivank Garg <shivankg@amd.com>,
shaggy@kernel.org, david@redhat.com, wangkefeng.wang@huawei.com,
jane.chu@oracle.com, ziy@nvidia.com, donettom@linux.ibm.com,
apopple@nvidia.com, jfs-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
syzbot+8bb6fd945af4e0ad9299@syzkaller.appspotmail.com
Subject: Re: [PATCH V4 1/2] mm: add folio_migration_expected_refs() as inline function
Date: Wed, 23 Apr 2025 01:36:10 +0100 [thread overview]
Message-ID: <aAg1-hZ0a-44WW6b@casper.infradead.org> (raw)
In-Reply-To: <20250422164111.f5d3f0756ad94d012180ece5@linux-foundation.org>
On Tue, Apr 22, 2025 at 04:41:11PM -0700, Andrew Morton wrote:
> > +/**
> > + * folio_migrate_expected_refs - Count expected references for an unmapped folio.
>
> "folio_migration_expected_refs"
Please run make W=1 fs/jfs/ in order to run kernel-doc on this file.
It'll flag this kind of error.
> It's concerning that one particular filesystem needs this - one
> suspects that it is doing something wrong, or that the present API
> offerings were misdesigned. It would be helpful if the changelogs were
> to explain what is special about JFS.
It doesn't surprise me at all. Almost no filesystem implements its own
migrate_folio operation. Without going into too much detail, almost
all filesystems can use filemap_migrate_folio(), buffer_migrate_folio()
or buffer_migrate_folio_norefs(). So this is not an indication that
jfs is doing anything wrong (except maybe it's misdesigned in that the
per-folio metadata caches the address of the folio, but changing that
seems very much too much work to ask someone to do).
What I do wonder is whether we want to have such a specialised
function existing. We have can_split_folio() in huge_memory.c
which is somewhat more comprehensive and doesn't require the folio to be
unmapped first.
I currently lack the capacity to write pseudo-code illustrating what I
mean, but I'll have a try tomorrow.
next prev parent reply other threads:[~2025-04-23 0:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 11:40 [PATCH V4 0/2] JFS: Implement migrate_folio for jfs_metapage_aops Shivank Garg
2025-04-22 11:40 ` [PATCH V4 1/2] mm: add folio_migration_expected_refs() as inline function Shivank Garg
2025-04-22 15:18 ` David Hildenbrand
2025-04-22 15:22 ` Zi Yan
2025-04-22 23:41 ` Andrew Morton
2025-04-23 0:36 ` Matthew Wilcox [this message]
2025-04-23 7:22 ` David Hildenbrand
2025-04-23 7:25 ` David Hildenbrand
2025-04-24 3:19 ` Matthew Wilcox
2025-04-24 11:57 ` Shivank Garg
2025-04-25 7:47 ` David Hildenbrand
2025-04-29 10:57 ` Shivank Garg
2025-04-29 11:31 ` David Hildenbrand
2025-04-22 11:40 ` [PATCH V4 2/2] jfs: implement migrate_folio for jfs_metapage_aops Shivank Garg
2025-04-22 15:23 ` David Hildenbrand
2025-04-22 13:59 ` [syzbot] [mm?] WARNING in move_to_new_folio syzbot
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=aAg1-hZ0a-44WW6b@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=david@redhat.com \
--cc=donettom@linux.ibm.com \
--cc=jane.chu@oracle.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shaggy@kernel.org \
--cc=shivankg@amd.com \
--cc=syzbot+8bb6fd945af4e0ad9299@syzkaller.appspotmail.com \
--cc=wangkefeng.wang@huawei.com \
--cc=ziy@nvidia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.