]> git.baikalelectronics.ru Git - kernel.git/commit
page-allocator: preserve PFN ordering when __GFP_COLD is set
authorMel Gorman <mel@csn.ul.ie>
Wed, 29 Jul 2009 22:02:04 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jul 2009 02:10:34 +0000 (19:10 -0700)
commitdc9be016bfb7ec2b15114b752e7c38db376338ca
treeff15d36a3a1e49fdbd5080decb7ab00afdd60099
parentc7ee4051572888e91a09239e169236ff7649af02
page-allocator: preserve PFN ordering when __GFP_COLD is set

Fix a post-2.6.24 performace regression caused by
e7a60526aef1cd9bf2810696775cf205deef9555 ("page-allocator: preserve PFN
ordering when __GFP_COLD is set").

Narayanan reports "The regression is around 15%.  There is no disk controller
as our setup is based on Samsung OneNAND used as a memory mapped device on a
OMAP2430 based board."

The page allocator tries to preserve contiguous PFN ordering when returning
pages such that repeated callers to the allocator have a strong chance of
getting physically contiguous pages, particularly when external fragmentation
is low.  However, of the bulk of the allocations have __GFP_COLD set as they
are due to aio_read() for example, then the PFNs are in reverse PFN order.
This can cause performance degration when used with IO controllers that could
have merged the requests.

This patch attempts to preserve the contiguous ordering of PFNs for users of
__GFP_COLD.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reported-by: Narayananu Gopalakrishnan <narayanan.g@samsung.com>
Tested-by: Narayanan Gopalakrishnan <narayanan.g@samsung.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c