]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: compaction: accounting fix
authorMinchan Kim <minchan.kim@gmail.com>
Wed, 28 Sep 2011 00:50:19 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:27 +0000 (14:53 +1000)
commit0e0843be6ede2797555722a2cd391f4a92773e89
treed4b17e6b42e4517f47424f1937fbb4851e8363a4
parent26ec27908d18236700ed6cd08e373f606ae280ae
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 <>
mm/compaction.c