[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB449C1.2020603@intel.com>
Date: Thu, 17 May 2012 08:43:45 +0800
From: Alex Shi <alex.shi@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Nick Piggin <npiggin@...il.com>, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, arnd@...db.de,
rostedt@...dmis.org, fweisbec@...il.com, jeremy@...p.org,
riel@...hat.com, luto@....edu, avi@...hat.com, len.brown@...el.com,
dhowells@...hat.com, fenghua.yu@...el.com, borislav.petkov@....com,
yinghai@...nel.org, ak@...ux.intel.com, cpw@....com,
steiner@....com, akpm@...ux-foundation.org, penberg@...nel.org,
hughd@...gle.com, rientjes@...gle.com,
kosaki.motohiro@...fujitsu.com, n-horiguchi@...jp.nec.com,
tj@...nel.org, oleg@...hat.com, axboe@...nel.dk, jmorris@...ei.org,
kamezawa.hiroyu@...fujitsu.com, viro@...iv.linux.org.uk,
linux-kernel@...r.kernel.org, yongjie.ren@...el.com,
linux-arch@...r.kernel.org
Subject: Re: [PATCH v5 6/7] x86/tlb: optimizing flush_tlb_mm
On 05/17/2012 05:09 AM, Peter Zijlstra wrote:
> On Wed, 2012-05-16 at 21:34 +0800, Alex Shi wrote:
>>
>> So, if the minimum change of tlb->start/end can be protected by
>> HAVE_GENERIC_MMU_GATHER, it is safe and harmless, am I right?
>>
> safe yes, but not entirely harmless. A quick look seems to suggest you
> fail for VM_HUGETLB. If your mmu_gather spans a vma with VM_HUGETLB
> you'll do a regular range flush not a full mm flush like the other paths
> do.
Thanks!
Uh, HUGETLB will be found by has_large_page() if THP enabled now. And I
will remove THP cost, then HUGETLB will be deal well. Since the max
number of TLB entries is 512, has_large_page just need execute once just
when the start address is align at HPAGE_SIZE.
IMHO, this patch enabled generic mmu range flush support with just teen
lines. and it is supported well by low level x86 architecture. I like it. :)
>
> Anyway, I did a quick refresh of my series on a recent -tip tree:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/peterz/mmu.git tlb-unify
>
> With that all you need is to "select HAVE_MMU_GATHER_RANGE" for x86 and
> implement a useful flush_tlb_range().
>
> In particular, see:
> http://git.kernel.org/?p=linux/kernel/git/peterz/mmu.git;a=commitdiff;h=05e53144177e6242fda404045f50f48114bcf185;hp=2cd7dc710652127522392f4b7ecb5fa6e954941e
>
> I've slightly changed the code to address an open issue with the
> vm_flags tracking. We now force flush the mmu_gather whenever VM_HUGETLB
> flips because most (all?) archs that look at that flag expect pure huge
> pages and not a mixture.
>
> I've seem to have misplaced my cross-compiler set, so I've only compiled
> x86-64 for now.
Oh, I also need a cross-compiler for other archs. Thanks reminder!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists