Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

From: Mike Rapoport
Date: Wed Feb 26 2020 - 04:13:44 EST


On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote:
> On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote:
> >
> >
> > Le 16/02/2020 à 09:18, Mike Rapoport a écrit :
> > > From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> > >
> > > Implement primitives necessary for the 4th level folding, add walks of p4d
> > > level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h.
> >
> > I don't think it is worth adding all this additionnals walks of p4d, this
> > patch could be limited to changes like:
> >
> > - pud = pud_offset(pgd, gpa);
> > + pud = pud_offset(p4d_offset(pgd, gpa), gpa);
> >
> > The additionnal walks should be added through another patch the day powerpc
> > need them.
>
> Ok, I'll update the patch to reduce walking the p4d.

Here's what I have with more direct acceses from pgd to pud.