]> git.karo-electronics.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>
Wed, 21 Dec 2011 06:02:02 +0000 (17:02 +1100)
commitce8729f7b2197163c89fbdb2d250bcb34e1e3407
tree31ff4f4d8ea9af1d554a2af6a86476018b1baf76
parent2e4220527b10f1e0f75a4b05653bf4f0f0b6a2d6
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