From wli@holomorphy.com Mon Jan 3 11:13:19 2005 Return-Path: X-Original-To: jbarnes@spamtin.engr.sgi.com Delivered-To: jbarnes@spamtin.engr.sgi.com Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by spamtin.engr.sgi.com (Postfix) with ESMTP id ECAEB2404117 for ; Mon, 3 Jan 2005 11:13:24 -0800 (PST) Received: from internal-mail-relay.corp.sgi.com (internal-mail-relay.corp.sgi.com [198.149.32.51]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id j03JDOFw4629241 for ; Mon, 3 Jan 2005 11:13:24 -0800 (PST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by internal-mail-relay.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id j03JDOXd172192007 for ; Mon, 3 Jan 2005 11:13:24 -0800 (PST) X-ASG-Debug-ID: 1104779603-3460-209-0 X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from holomorphy.com (holomorphy.com [207.189.100.168]) by cuda.sgi.com (Spam Firewall) with ESMTP id B0818D01BF0E for ; Mon, 3 Jan 2005 11:13:23 -0800 (PST) Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1ClXdn-0008Bd-00; Mon, 03 Jan 2005 11:13:19 -0800 Date: Mon, 3 Jan 2005 11:13:19 -0800 From: William Lee Irwin III To: jbarnes@engr.sgi.com Cc: akpm@osdl.org, linux-kernel@vger.kernel.org X-ASG-Orig-Subj: [bootfix] pass used_node_mask by reference in 2.6.10-mm1 Subject: [bootfix] pass used_node_mask by reference in 2.6.10-mm1 Message-ID: <20050103191319.GO29332@holomorphy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.6+20040722i X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 2.64, rules version 2.1.765 Rule breakdown below pts rule name description ---- ---------------------- ------------------------------------------- X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on spamtin.engr.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-UID: 15217 X-Length: 4077 Without passing this parameter by reference, the changes to used_node_mask are meaningless and do not affect the caller's copy. This leads to boot-time failure. This proposed fix passes it by reference. -- wli Signed-off-by: William Irwin Index: mm1-2.6.10/mm/page_alloc.c =================================================================== --- mm1-2.6.10.orig/mm/page_alloc.c 2005-01-03 10:37:58.000000000 -0800 +++ mm1-2.6.10/mm/page_alloc.c 2005-01-03 10:44:01.000000000 -0800 @@ -1377,7 +1377,7 @@ * on them otherwise. * It returns -1 if no node is found. */ -static int __init find_next_best_node(int node, nodemask_t used_node_mask) +static int __init find_next_best_node(int node, nodemask_t *used_node_mask) { int i, n, val; int min_val = INT_MAX; @@ -1390,11 +1390,11 @@ n = (node+i) % num_online_nodes(); /* Don't want a node to appear more than once */ - if (node_isset(n, used_node_mask)) + if (node_isset(n, *used_node_mask)) continue; /* Use the local node if we haven't already */ - if (!node_isset(node, used_node_mask)) { + if (!node_isset(node, *used_node_mask)) { best_node = node; break; } @@ -1418,7 +1418,7 @@ } if (best_node >= 0) - node_set(best_node, used_node_mask); + node_set(best_node, *used_node_mask); return best_node; } @@ -1442,7 +1442,7 @@ load = num_online_nodes(); prev_node = local_node; nodes_clear(used_mask); - while ((node = find_next_best_node(local_node, used_mask)) >= 0) { + while ((node = find_next_best_node(local_node, &used_mask)) >= 0) { /* * We don't want to pressure a particular node. * So adding penalty to the first node in same