lkml.org 
[lkml]   [2018]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 03/11] x86/mm: Page size aware flush_tlb_mm_range()
On Thu, Sep 13, 2018 at 08:42:30PM +0200, Peter Zijlstra wrote:
> > > +#define flush_tlb_range(vma, start, end) \
> > > + flush_tlb_mm_range((vma)->vm_mm, start, end, \
> > > + (vma)->vm_flags & VM_HUGETLB ? PMD_SHIFT : PAGE_SHIFT)
> >
> > This is safe. But, Couldn't this PMD_SHIFT also be PUD_SHIFT for a 1G
> > hugetlb page?
>
> It could be, but can we tell at that point?

I had me a look in higetlb.h, would something like so work?

#define flush_tlb_range(vma, start, end) \
flush_tlb_mm_range((vma)->vm_mm, start, end, \
huge_page_shift(hstate_vma(vma)))


\
 
 \ /
  Last update: 2018-09-13 20:47    [W:0.074 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site