]> git.baikalelectronics.ru Git - kernel.git/commit
Fix calculation in move_freepages_block for counting pages
authorMel Gorman <mel@csn.ul.ie>
Tue, 16 Oct 2007 08:26:00 +0000 (01:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:00 +0000 (09:43 -0700)
commit295dbedd94fdf130a212f6df33172e8f09800a05
treef0bcd5e3b07bee40a65182c63b54baceca366849
parent4bd0b84e125c4932c4d61d61e9f4b4578712f840
Fix calculation in move_freepages_block for counting pages

move_freepages_block() returns the number of blocks moved.  This value is used
to determine if a block of pages should be stolen for the exclusive use of a
migrate type or not.  However, the value returned is being used correctly.
This patch fixes the calculation to return the number of base pages that have
been moved.

This should be considered a fix to the patch
move-free-pages-between-lists-on-steal.patch

Credit to Andy Whitcroft for spotting the problem.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c