lkml.org 
[lkml]   [2018]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 09/11] asm-generic/tlb: Track which levels of the page tables have been cleared
On Mon, Aug 27, 2018 at 09:53:41AM +0200, Peter Zijlstra wrote:
> On Fri, Aug 24, 2018 at 04:52:44PM +0100, Will Deacon wrote:
> > +static inline unsigned long tlb_get_unmap_granule(struct mmu_gather *tlb)
> > +{
> > + if (tlb->cleared_ptes)
> > + return PAGE_SIZE;
> > + if (tlb->cleared_pmds)
> > + return PMD_SIZE;
> > + if (tlb->cleared_puds)
> > + return PUD_SIZE;
> > + if (tlb->cleared_p4ds)
> > + return P4D_SIZE;
> > +
> > + return PAGE_SIZE;
> > +}
>
> When doing the x86 patch; I found _SHIFT more useful than _SIZE.

I'll make that change for the next version.

Cheers,

Will

\
 
 \ /
  Last update: 2018-08-28 15:13    [W:0.069 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site