diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-09 23:24:38 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-09 23:24:38 -0700 |
| commit | e18e19ade9a0c0334cf8a2bc1945d97ec1697061 (patch) | |
| tree | 57afc4fa73702ed5d66fb8197f8668e65de28e8a /include/linux/sched.h | |
| parent | 7a1dc0ea9e84be7175d007b19ae9d8caab13c2e5 (diff) | |
[PATCH] sched: implement domains for i386 HT
From: Nick Piggin <piggin@cyberone.com.au>
The following patch builds a scheduling description for the i386
architecture using cpu_sibling_map to set up SMT if CONFIG_SCHED_SMT is
set.
It could be made more fancy and collapse degenerate domains at runtime (ie.
1 sibling per CPU, or 1 NUMA node in the computer).
From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
This fixes an oops due to cpu_sibling_map being uninitialised when a
system with no MP table (most UP boxen) boots a CONFIG_SMT kernel. What
also happens is that the cpu_group lists end up not being terminated
properly, but this oops kills it first. Patch tested on UP w/o MP table,
2x P2 and UP Xeon w/ no siblings.
From: "Martin J. Bligh" <mbligh@aracnet.com>,
Nick Piggin <piggin@cyberone.com.au>
Change arch_init_sched_domains to use cpu_online_map
From: Anton Blanchard <anton@samba.org>
Fix build with NR_CPUS > BITS_PER_LONG
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8cb322f0839d..fa0b49eb1578 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -572,6 +572,22 @@ struct sched_domain { unsigned int nr_balance_failed; /* initialise to 0 */ }; +/* Common values for SMT siblings */ +#define SD_SIBLING_INIT (struct sched_domain) { \ + .span = CPU_MASK_NONE, \ + .parent = NULL, \ + .groups = NULL, \ + .min_interval = 1, \ + .max_interval = 2, \ + .busy_factor = 8, \ + .imbalance_pct = 110, \ + .cache_hot_time = 0, \ + .cache_nice_tries = 0, \ + .flags = SD_FLAG_FASTMIGRATE | SD_FLAG_NEWIDLE | SD_FLAG_WAKE,\ + .balance_interval = 1, \ + .nr_balance_failed = 0, \ +} + /* Common values for CPUs */ #define SD_CPU_INIT (struct sched_domain) { \ .span = CPU_MASK_NONE, \ |
