All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xavier Bru <xavier.bru@bull.net>
To: linux-ia64@vger.kernel.org
Subject: Allow to change SD_NODES_PER_DOMAIN at configuration or boot time
Date: Wed, 16 Feb 2005 17:17:07 +0000	[thread overview]
Message-ID: <42138013.3060909@bull.net> (raw)

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

Hello Nick and all,
I remember this was discussed some months ago, but it still seems that 
on 2.6.10, SD_NODES_PER_DOMAIN is statically defined to value 6.
This is not what is expected on Bull ia64 platforms, based on modules of 
4 bricks of 4 cpus each.
Using the cpu hot-plug mechanism to re-define dynamically the 
sched-domains looks heavy (please correct me if I am wrong).
Hereafter a trivial patch that allows to setup SD_NODES_PER_DOMAIN at 
configuration time or at boot time.
Boot time parameter should be helpfull, as on 32*ways machine based on 2 
modules of 4 bricks of 4 cpus each, it allows to build either 1 
(SD_NODES_PER_DOMAIN=8) or 2 (SD_NODES_PER_DOMAIN=4) NUMA sched-domain 
levels.
Thanks in advance for your comments.

diff --exclude-from /home15/xb/proc/patch.exclude -Nurp 
/tmp/linux-2.6.10/arch/ia64/Kconfig linux-2.6.10/arch/ia64/Kconfig
--- /tmp/linux-2.6.10/arch/ia64/Kconfig    2004-12-24 22:35:29.000000000 
+0100
+++ linux-2.6.10/arch/ia64/Kconfig    2005-02-15 17:07:46.741070673 +0100
@@ -168,6 +168,17 @@ config NUMA
       Access).  This option is for configuring high-end multiprocessor
       server systems.  If in doubt, say N.
 
+config SD_NODES_PER_DOMAIN
+    int "Number of nodes per base sched_domains"
+    default "4" if IA64_DIG
+    default "6"
+    help
+      Number of nodes per base sched_domains.
+      Should be 6 for SGI platforms.
+      Should be 4 for DIG platforms.
+      This value can be provided at boot time using the sd_nodes_per_domain
+      boot parameter.
+       
 config VIRTUAL_MEM_MAP
     bool "Virtual mem map"
     default y if !IA64_HP_SIM
diff --exclude-from /home15/xb/proc/patch.exclude -Nurp 
/tmp/linux-2.6.10/arch/ia64/kernel/domain.c 
linux-2.6.10/arch/ia64/kernel/domain.c
--- /tmp/linux-2.6.10/arch/ia64/kernel/domain.c    2004-12-24 
22:35:40.000000000 +0100
+++ linux-2.6.10/arch/ia64/kernel/domain.c    2005-02-15 
15:04:08.964794354 +0100
@@ -13,7 +13,14 @@
 #include <linux/init.h>
 #include <linux/topology.h>
 
-#define SD_NODES_PER_DOMAIN 6
+int sd_nodes_per_domain = CONFIG_SD_NODES_PER_DOMAIN;
+
+static int __init set_sd_nodes_per_domain(char *str)
+{
+    get_option(&str, &sd_nodes_per_domain);
+    return 1;
+}
+__setup("sd_nodes_per_domain=", set_sd_nodes_per_domain);
 
 #ifdef CONFIG_NUMA
 /**
@@ -78,7 +85,7 @@ static cpumask_t __devinit sched_domain_
     cpus_or(span, span, nodemask);
     set_bit(node, used_nodes);
 
-    for (i = 1; i < SD_NODES_PER_DOMAIN; i++) {
+    for (i = 1; i < sd_nodes_per_domain; i++) {
         int next_node = find_next_best_node(node, used_nodes);
         nodemask = node_to_cpumask(next_node);
         cpus_or(span, span, nodemask);
@@ -159,7 +166,7 @@ void __devinit arch_init_sched_domains(v
 
 #ifdef CONFIG_NUMA
         if (num_online_cpus()
-                > SD_NODES_PER_DOMAIN*cpus_weight(nodemask)) {
+                > sd_nodes_per_domain*cpus_weight(nodemask)) {
             sd = &per_cpu(allnodes_domains, i);
             *sd = SD_ALLNODES_INIT;
             sd->span = cpu_default_map;

-- 

	Sincères salutations.


[-- Attachment #2: xavier.bru.vcf --]
[-- Type: text/x-vcard, Size: 306 bytes --]

begin:vcard
fn:Xavier Bru
n:Bru;Xavier
adr:;;1 rue de Provence, BP 208;Echirolles;;38432 Cedex;France
email;internet:Xavier.Bru@bull.net
title:BULL/DT/Open Software/linux/ia64
tel;work:+33 (0)4 76 29 77 45
tel;fax:+33 (0)4 76 29 77 70
x-mozilla-html:TRUE
url:http://www-frec.bull.fr
version:2.1
end:vcard


             reply	other threads:[~2005-02-16 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-16 17:17 Xavier Bru [this message]
2005-02-17  0:08 ` Allow to change SD_NODES_PER_DOMAIN at configuration or boot time Luck, Tony
2005-02-17  0:13 ` Jesse Barnes
2005-02-17  0:28 ` Allow to change SD_NODES_PER_DOMAIN at configuration or boot Nick Piggin
2005-02-17  1:07 ` Allow to change SD_NODES_PER_DOMAIN at configuration or boot time Luck, Tony
2005-02-17  1:24 ` Jesse Barnes
2005-02-17 11:05 ` Allow to change SD_NODES_PER_DOMAIN at configuration or boot Xavier Bru
2005-02-17 16:33 ` Nick Piggin
2005-02-24  7:39 ` Nick Piggin

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=42138013.3060909@bull.net \
    --to=xavier.bru@bull.net \
    --cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.