Re: [RFC PATCH 05/12] fs/proc/task_mmu: refactor pagemap_pmd_range()

Lorenzo Stoakes
2025-10-28T17:38:05Z

On Tue, Oct 28, 2025 at 09:09:01AM -0400, Gregory Price wrote:
> 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".

This is the point I was trying to make yes.

>
> Please do not do this, I regret making the joke.

Never joke on list is the lesson here :)

I have had to learn that the hard way myself...

>
> Regards,
> Gregory

Cheers, Lorenzo