Re: [PATCH] mm/vmalloc: track which page-table levels were modified

Mike Rapoport
2020-06-09T15:25:14Z

Hi Joerg,

On Tue, Jun 09, 2020 at 02:10:56PM +0200, Joerg Roedel wrote:
> Hi Mike,
>
> On Fri, Jun 05, 2020 at 01:00:59PM +0300, Mike Rapoport wrote:
> > We already have include/asm-generic/pgalloc.h, so maybe something like
> > that patch below would fork. This is not even compile tested.
> >
> > diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h
>
> I experimented a bit with your diff, but it turned out that moving the
> page-table allocation functions/macros to asm-generic/pgalloc.h does not
> work on all architectures.
>
> The reason is that some archs don't use that header at all (e.g. ARC)
> and have their own version of the functions defined there. That could
> all be made working, but I decided to no open this can of worms for now.
>
> So I sent out a patch which moves the p?d_alloc_track() functions/macros
> to a separate header and include it only in mm/vmalloc.c and
> lib/ioremap.c.

I'm planning to open this can of worms eventually, but having
p?d_alloc_track() in a separate header wouldn't be the biggest of my
problems :)

> That compiles on all architectures where current Linus'
> master also builds (it does not for Alpha, CSky, Mips and Mips64), and
> as usual Hexagon and Unicore32 are not tested because I have no working
> compiler for those.
>
> Regards,
>
> Joerg

--
Sincerely yours,
Mike.