aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/affinity.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2011-06-22 01:30:25 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 12:04:53 -0400
commitb4c52e27caa701a16e120b43a0e70ca6529a58a4 (patch)
tree677c7326db2a1334b28870c2cf4dc3a9795be08e /litmus/affinity.c
parentb751e4e17e667f11404fc2f290416c0df050e964 (diff)
C-EDF: Make migration affinity work with Release Master
Needed to update C-EDF to handle release master. Also updated get_nearest_available_cpu() to take NO_CPU instead of -1 to indicate that there is no release master. While NO_CPU is 0xffffffff (-1 in two's complement), we still translate this value to -1 in case NO_CPU changes. Signed-off-by: Andrea Bastoni <bastoni@cs.unc.edu>
Diffstat (limited to 'litmus/affinity.c')
-rw-r--r--litmus/affinity.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/litmus/affinity.c b/litmus/affinity.c
index 9adab7a3bcd7..3fa6dd789400 100644
--- a/litmus/affinity.c
+++ b/litmus/affinity.c
@@ -16,8 +16,6 @@ void init_topology(void) {
16 16
17 for_each_online_cpu(cpu) { 17 for_each_online_cpu(cpu) {
18 for (i = 0; i < depth; ++i) { 18 for (i = 0; i < depth; ++i) {
19 long unsigned int firstbits;
20
21 chk = get_shared_cpu_map((struct cpumask *)&neigh_info[cpu].neighbors[i], cpu, i); 19 chk = get_shared_cpu_map((struct cpumask *)&neigh_info[cpu].neighbors[i], cpu, i);
22 if (chk) { 20 if (chk) {
23 /* failed */ 21 /* failed */
@@ -27,9 +25,9 @@ void init_topology(void) {
27 neigh_info[cpu].size[i] = 25 neigh_info[cpu].size[i] =
28 cpumask_weight((struct cpumask *)&neigh_info[cpu].neighbors[i]); 26 cpumask_weight((struct cpumask *)&neigh_info[cpu].neighbors[i]);
29 } 27 }
30 firstbits = *neigh_info[cpu].neighbors[i]->bits;
31 printk("CPU %d has %d neighbors at level %d. (mask = %lx)\n", 28 printk("CPU %d has %d neighbors at level %d. (mask = %lx)\n",
32 cpu, neigh_info[cpu].size[i], i, firstbits); 29 cpu, neigh_info[cpu].size[i], i,
30 *cpumask_bits(neigh_info[cpu].neighbors[i]));
33 } 31 }
34 32
35 /* set data for non-existent levels */ 33 /* set data for non-existent levels */