]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: add tlb_remove_pmd_tlb_entry
authorShaohua Li <shaohua.li@intel.com>
Thu, 8 Dec 2011 04:42:48 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Dec 2011 04:19:18 +0000 (15:19 +1100)
commit412d6af6a077e555571cce368cbd1f74cbd1d8f2
tree6e0fe4a54e58bc83b643293c032064d74dd99f6d
parent9617ee470aba339c089eefdeeba44d7ad310516a
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