aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/mm/init.c
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2008-04-28 02:12:17 -0700
committerLinus Torvalds <[email protected]>2008-04-28 08:58:18 -0700
commitdd1a239f6f2d4d3eedd318583ec319aa145b324c (patch)
treeaff4224c96b5e2e67588c3946858a724863eeaf9 /arch/parisc/mm/init.c
parent54a6eb5c4765aa573a030ceeba2c14e3d2ea5706 (diff)
mm: have zonelist contains structs with both a zone pointer and zone_idx
Filtering zonelists requires very frequent use of zone_idx(). This is costly as it involves a lookup of another structure and a substraction operation. As the zone_idx is often required, it should be quickly accessible. The node idx could also be stored here if it was found that accessing zone->node is significant which may be the case on workloads where nodemasks are heavily used. This patch introduces a struct zoneref to store a zone pointer and a zone index. The zonelist then consists of an array of these struct zonerefs which are looked up as necessary. Helpers are given for accessing the zone index as well as the node index. [[email protected]: Suggested struct zoneref instead of embedding information in pointers] [[email protected]: mm-have-zonelist: fix memcg ooms] [[email protected]: just return do_try_to_free_pages] [[email protected]: do_try_to_free_pages gfp_mask redundant] Signed-off-by: Mel Gorman <[email protected]> Acked-by: Christoph Lameter <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'arch/parisc/mm/init.c')
-rw-r--r--arch/parisc/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 9bb6136d77c2..1f012843150f 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -608,7 +608,7 @@ void show_mem(void)
for (i = 0; i < npmem_ranges; i++) {
zl = node_zonelist(i);
for (j = 0; j < MAX_NR_ZONES; j++) {
- struct zone **z;
+ struct zoneref *z;
struct zone *zone;
printk("Zone list for zone %d on node %d: ", j, i);