mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@engr.sgi.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fix find_next_best_node
Date: Thu, 4 Nov 2004 09:55:57 -0800	[thread overview]
Message-ID: <200411040955.57369.jbarnes@engr.sgi.com> (raw)

[-- 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);
 

                 reply	other threads:[~2004-11-04 17:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411040955.57369.jbarnes@engr.sgi.com \
    --to=jbarnes@engr.sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®