]> git.kernelconcepts.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>
Tue, 13 Dec 2011 06:43:34 +0000 (17:43 +1100)
commitb448a781c49bd5557ee7a4a15cccaafcd67a833b
treed0dfaa1a4a20e1aa00a3d6664f38345c3ef4d0e8
parent5257f3c0322dd3d20892163a082fe67bd17f621c
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