mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix find_next_best_node
@ 2004-11-04 17:55 Jesse Barnes
  0 siblings, 0 replies; only message in thread
From: Jesse Barnes @ 2004-11-04 17:55 UTC (permalink / raw)
  To: akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

If NUMA is enabled, find_next_best_node is responsible for helping build the 
zonelist for each pgdat in the system.  However, if one sets 
PENALTY_FOR_NODE_WITH_CPUS to a large value in an attempt to prefer nodes w/o 
CPUs, the local node is erroneously placed after all nodes w/o CPUs in the 
pgdat's zonelist.  This small patch fixes that by just checking if the local 
node is part of the zonelist yet, and if not, returns it first.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>

Thanks,
Jesse

[-- Attachment #2: local-node-with-penalty-fix.patch --]
[-- Type: text/plain, Size: 446 bytes --]

===== mm/page_alloc.c 1.239 vs edited =====
--- 1.239/mm/page_alloc.c	2004-10-25 13:06:48 -07:00
+++ edited/mm/page_alloc.c	2004-11-04 09:41:23 -08:00
@@ -1213,6 +1213,12 @@
 		if (test_bit(n, used_node_mask))
 			continue;
 
+		/* Use the local node if we haven't already */
+		if (!test_bit(node, used_node_mask)) {
+			best_node = node;
+			break;
+		}
+
 		/* Use the distance array to find the distance */
 		val = node_distance(node, n);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-04 17:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 17:55 [PATCH] fix find_next_best_node Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®