]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
thp: add tlb_remove_pmd_tlb_entry
authorShaohua Li <shaohua.li@intel.com>
Fri, 16 Dec 2011 04:50:40 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 20 Dec 2011 07:44:03 +0000 (18:44 +1100)
commit47d377854e3436e3468b42aaa341c22b0d5d22be
treea81448af10d841b6d5a7e6af384845e229fbeedd
parent2cf82e83f91c89c65ff2f0dc4ff271b1c493883a
thp: add tlb_remove_pmd_tlb_entry

We have tlb_remove_tlb_entry to indicate a pte tlb flush entry should be
flushed, but not a corresponding API for pmd entry.  This isn't a problem
so far because THP is only for x86 currently and tlb_flush() under x86
will flush entire TLB.  But this is confusion and could be missed if thp
is ported to other arch.

Also convert tlb->need_flush = 1 to a VM_BUG_ON(!tlb->need_flush) in
__tlb_remove_page() as suggested by Andrea Arcangeli.  __tlb_remove_page()
is supposed to be called after tlb_remove_xxx_tlb_entry() and we can catch
any misuse.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/asm-generic/tlb.h
include/linux/huge_mm.h
mm/huge_memory.c
mm/memory.c