History

sched: add arch_update_cpu_topology hook.

Will be called each time the scheduling domains are rebuild. Needed for architectures that don't have a static cpu topology.

Heiko Carstens committed 18 years ago

Commit 22e52b01 parent 9aefd0a2 files · +7 −0Browse files

Unified · Split

2 files
  1. include/linux/topology.h +2 −0
  2. kernel/sched.c +5 −0
include/linux/topology.h+2−0
@@ -50,6 +50,8 @@ · 49 unmodified lines
5050 for_each_online_node(node) \
5151 if (nr_cpus_node(node))
5252
53+void arch_update_cpu_topology(void);
54+
5355 /* Conform to ACPI 2.0 SLIT distance definitions */
5456 #define LOCAL_DISTANCE 10
5557 #define REMOTE_DISTANCE 20
kernel/sched.c+5−0
@@ -6807,6 +6807,10 @@ static int ndoms_cur; /* number of sched domains in 'doms_cur' */ · 6806 unmodified lines
68076807 */
68086808 static cpumask_t fallback_doms;
68096809
6810+void __attribute__((weak)) arch_update_cpu_topology(void)
6811+{
6812+}
6813+
68106814 /*
68116815 * Set up scheduler domains and groups. Callers must hold the hotplug lock.
68126816 * For now this just excludes isolated cpus, but could be used to
@@ -6816,6 +6820,7 @@ static int arch_init_sched_domains(const cpumask_t *cpu_map) · 3 unmodified lines
68166820 {
68176821 int err;
68186822
6823+ arch_update_cpu_topology();
68196824 ndoms_cur = 1;
68206825 doms_cur = kmalloc(sizeof(cpumask_t), GFP_KERNEL);
68216826 if (!doms_cur)