diff options
author | Mel Gorman <mel@csn.ul.ie> | 2009-06-16 15:31:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 19:47:33 -0700 |
commit | 5117f45d11a9ee62d9b086f1312f3f31781ff155 (patch) | |
tree | 3f7b26f697d14d56be7278bcc4917e4f6d0c2c3d /mm/fadvise.c | |
parent | 49255c619fbd482d704289b5eb2795f8e3b7ff2e (diff) | |
download | blackbird-op-linux-5117f45d11a9ee62d9b086f1312f3f31781ff155.tar.gz blackbird-op-linux-5117f45d11a9ee62d9b086f1312f3f31781ff155.zip |
page allocator: calculate the preferred zone for allocation only once
get_page_from_freelist() can be called multiple times for an allocation.
Part of this calculates the preferred_zone which is the first usable zone
in the zonelist but the zone depends on the GFP flags specified at the
beginning of the allocation call. This patch calculates preferred_zone
once. It's safe to do this because if preferred_zone is NULL at the start
of the call, no amount of direct reclaim or other actions will change the
fact the allocation will fail.
[akpm@linux-foundation.org: remove (void) casts]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/fadvise.c')
0 files changed, 0 insertions, 0 deletions