]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, highmem: makes flush_all_zero_pkmaps() return index of last flushed entry
authorJoonsoo Kim <js1304@gmail.com>
Fri, 9 Nov 2012 03:04:07 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Nov 2012 03:08:36 +0000 (14:08 +1100)
commit87b1c9204adb3e7ed4a36af9d3944f15ce51ca4f
treeceeb5fb26fc561cf670e5759b783d1b261a68529
parenta7c09988821acd2268beca3509b3ce0f9a8f4353
mm, highmem: makes flush_all_zero_pkmaps() return index of last flushed entry

In current code, after flush_all_zero_pkmaps() is invoked we re-iterate
all pkmaps.  This can be optimized if flush_all_zero_pkmaps() returns an
index of flushed entry.  With this index, we can immediately map highmem
page to virtual address represented by index.  So change return type of
flush_all_zero_pkmaps() and return index of last flushed entry.

Additionally, update last_pkmap_nr to this index.  It is certain that
entry which is below this index is occupied by other mapping, therefore
updating last_pkmap_nr to this index is reasonable optimization.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/highmem.h
mm/highmem.c