]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm-highmem-makes-flush_all_zero_pkmaps-return-index-of-last-flushed-entry-v2
authorJoonsoo Kim <js1304@gmail.com>
Sat, 3 Nov 2012 00:42:23 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 8 Nov 2012 04:08:36 +0000 (15:08 +1100)
commit7264a39f17bbaa6cf58c8347e19344fe1409ccc4
tree8cd3f458ae30381560c73bcf058d56dd245fda91
parentdea69b9f05ab827f158119258192145193637b35
mm-highmem-makes-flush_all_zero_pkmaps-return-index-of-last-flushed-entry-v2

In current code, after flush_all_zero_pkmaps() is invoked,
then re-iterate all pkmaps. It can be optimized if flush_all_zero_pkmaps()
return index of first 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 first 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: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/highmem.h
mm/highmem.c