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

From: Joerg Roedel
Date: Fri Jun 05 2020 - 04:12:54 EST


On Thu, Jun 04, 2020 at 10:16:07AM -0700, Linus Torvalds wrote:
> On Thu, Jun 4, 2020 at 1:35 AM Joerg Roedel <jroedel@xxxxxxx> wrote:
> >
> > I posted the fix for this already:
> >
> > https://lore.kernel.org/lkml/20200604074446.23944-1-joro@xxxxxxxxxx/
>
> Ugh.
>
> I was going to apply this directly, but as I looked at the patch I
> just found it fairly illegible.
>
> Is there some reason why the 5level-fixup.h versions use that
> very-hard-to-follow macro, rather than the inline functions that the
> main mm.h file uses?
>
> I'm _assuming_ it's because it gets included in some place where not
> everything is defined yet, so making it a macro means that it works
> (later on) when everything has come together..

Exactly, I had all of the p?d_alloc_track() functions as inlines first,
but that broke compilation on some obscure architectures, so I followed
the rule to make them macros when the p?d_alloc() was also a macro and
defined them close together.


Joerg