]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: compaction: accounting fix
authorMinchan Kim <minchan.kim@gmail.com>
Wed, 5 Oct 2011 00:43:06 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2011 06:32:09 +0000 (17:32 +1100)
commitee699c1f3c0cd5fc2f8cba5bdbef1d93646b5878
treeee4b9227cf95f28b23e7c452f104ab5e0fdb9d57
parent4d2c095a232c9c9c4c5b680f2cd3fc18143f47a9
mm: compaction: accounting fix

I saw the following accouting of compaction during test of the series.

compact_blocks_moved 251
compact_pages_moved 44

It's very awkward to me although it's possbile because it means we try to
compact 251 blocks but it just migrated 44 pages.  As further
investigation, I found isolate_migratepages doesn't isolate any pages but
it returns ISOLATE_SUCCESS and then, it just increases
compact_blocks_moved but doesn't increased compact_pages_moved.

This patch makes accouting of compaction works only in case of success of
isolation.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c