]> 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>
Sat, 3 Nov 2012 00:42:22 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Nov 2012 04:15:12 +0000 (15:15 +1100)
commit65e8f07821a523170e1d407a5468bfb60c9b3045
tree82043e25ae4b5f64f0b0eb2a301f12e967d51969
parent5458941ed2042198e0b80d24f351aa6b6fbc3fd3
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