Re: [PATCH v2 1/3] mm: document zone device struct page field usage

From: Christoph Hellwig
Date: Mon Jul 22 2019 - 05:37:01 EST


On Sun, Jul 21, 2019 at 09:02:04AM -0700, Matthew Wilcox wrote:
> On Fri, Jul 19, 2019 at 12:29:53PM -0700, Ralph Campbell wrote:
> > Struct page for ZONE_DEVICE private pages uses the page->mapping and
> > and page->index fields while the source anonymous pages are migrated to
> > device private memory. This is so rmap_walk() can find the page when
> > migrating the ZONE_DEVICE private page back to system memory.
> > ZONE_DEVICE pmem backed fsdax pages also use the page->mapping and
> > page->index fields when files are mapped into a process address space.
> >
> > Restructure struct page and add comments to make this more clear.
>
> NAK. I just got rid of this kind of foolishness from struct page,
> and you're making it harder to understand, not easier. The comments
> could be improved, but don't lay it out like this again.

This comes over pretty agressive. Please explain how making the
layout match how the code actually is used vs the previous separation
that is actively misleading and confused multiple people is "foolishness".