Re: [PATCH 2/3] mm: add bytes_to_page_end() helper
From: Lorenzo Stoakes
Date: Mon May 18 2026 - 09:43:21 EST
On Mon, May 18, 2026 at 03:24:15PM +0200, David Hildenbrand (Arm) wrote:
> On 5/18/26 15:15, Lorenzo Stoakes wrote:
> > On Mon, May 18, 2026 at 03:06:16PM +0200, David Hildenbrand (Arm) wrote:
> >> On 5/18/26 12:24, Lorenzo Stoakes wrote:
> >>>
> >>> Yeah please don't, that's already a weird situation I don't really love the idea
> >>> of extending that.
> >>>
> >>> mm_types.h seems the more appropriate place.
> >>
> >> I think I'd prefer vdso/page.h for something as basic as that.
> >>
> >> But definitely no new header unless really unavoidable :)
> >
> > I just find vdso/page.h an extremely weird beast. what does the VDSO have to do
> > with it and why are we smuggling some basic definitions there...
>
> Yeah, I don't know the history of all that, but I know that BIT(), ALIGN() etc
> are also in vdso/ ... and confused me in the past.
>
> So as long as PAGE_MASK etc is in there, I guess adding simple helpers in there
> as well is the right thing to do. (I don't know if the defines could be
> reasonably moved at this point)
OK then begrudgingly I guess that's fine :) (don't get me started on
linux/sched/mm.h btw, in the same vein as this file :)
Thorsten - this might be the easiest solution here. Then the series becomes move
the helper macro there (I don't love the new one so would rather you didn't add
that) as 1 patch, and updating the bitmap code as a 2nd patch (with a cover
letter obviously :)
>
> --
> Cheers,
>
> David
Thanks, Lorenzo