Messages in this thread | | | Date | Fri, 4 May 2012 21:38:33 +0800 | Subject | Re: [PATH v2 3/5] x86/tlb: fall back to flush all when meet a THP large page | From | Hillf Danton <> |
| |
On Fri, May 4, 2012 at 9:00 PM, Alex Shi <alex.shi@intel.com> wrote: > On 05/04/2012 08:11 PM, Hillf Danton wrote: > >> Hi Alex, >> >> if (vmflag & VM_EXEC) >> tlb_entries = tlb_lli_4k[ENTRIES]; >> @@ -22,11 +23,15 @@ void flush_tlb_range(struct vm_area_stru >> act_entries = tlb_entries > mm->total_vm ? >> mm->total_vm : tlb_entries; >> >> - if ((end - start)/PAGE_SIZE > act_entries/FLUSHALL_BAR) >> + pg_sz = (transparent_hugepage_enabled(vma) || >> + is_vm_hugetlb_page(vma)) ? >> + HPAGE_SIZE : PAGE_SIZE; >> + >> + if ((end - start)/pg_sz > act_entries/FLUSHALL_BAR) > > > Your patch should base on the second patch that expel the HUGETLB page. > The diff is only for showing idea.
> But the key fact is I did not find invlpg is help on HUGETLB.
Yep, I only assume flushing huge TLB is not far from regular TLB.
| |