]> Pileus Git - ~andy/linux/commit
x86/mm: Eliminate redundant page table walk during TLB range flushing
authorMel Gorman <mgorman@suse.de>
Tue, 21 Jan 2014 22:33:19 +0000 (14:33 -0800)
committerIngo Molnar <mingo@kernel.org>
Sat, 25 Jan 2014 08:10:43 +0000 (09:10 +0100)
commit71b54f8263860a37dd9f50f81880a9d681fd9c10
treea300b589402aedecee5835170de898932be8d176
parent15aa368255f249df0b2af630c9487bb5471bd7da
x86/mm: Eliminate redundant page table walk during TLB range flushing

When choosing between doing an address space or ranged flush,
the x86 implementation of flush_tlb_mm_range takes into account
whether there are any large pages in the range.  A per-page
flush typically requires fewer entries than would covered by a
single large page and the check is redundant.

There is one potential exception.  THP migration flushes single
THP entries and it conceivably would benefit from flushing a
single entry instead of the mm.  However, this flush is after a
THP allocation, copy and page table update potentially with any
other threads serialised behind it.  In comparison to that, the
flush is noise.  It makes more sense to optimise balancing to
require fewer flushes than to optimise the flush itself.

This patch deletes the redundant huge page check.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Tested-by: Davidlohr Bueso <davidlohr@hp.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Shi <alex.shi@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-sgei1drpOcburujPsfh6ovmo@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/tlb.c