Re: [RFC PATCH 05/12] fs/proc/task_mmu: refactor pagemap_pmd_range()
From: Gregory Price
Date: Tue Oct 28 2025 - 09:09:07 EST
On Tue, Oct 28, 2025 at 09:52:44AM -0300, Jason Gunthorpe wrote:
> On Mon, Oct 27, 2025 at 04:38:05PM +0000, Lorenzo Stoakes wrote:
>
> The union helps encode in the type system what code is operating on
> what type of the leaf entry.
>
> It seems pretty simple.
>
My recommendation of a union was a joke and is anything but simple.
Switching to a union now means every current toucher of a swp_entry_t
needs functions to do conversions to/from that thing as it gets passed
around to various subsystems. It increases overall complexity for no
value, i.e. "for negative value".
Please do not do this, I regret making the joke.
Regards,
Gregory