diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2015-03-20 22:11:29 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2015-03-20 22:11:29 -0400 |
commit | a2db9de00d3e16763c85d8694194f66c53eca8af (patch) | |
tree | 66fce424248783bf393c830a8cf7c157d1d2d3f5 | |
parent | e5c2080e0d7cb2201d021edd7d89f3c2e783744e (diff) |
Fixed set partition bug
-rw-r--r-- | litmus/bank_proc.c | 10 | ||||
-rw-r--r-- | litmus/cache_proc.c | 18 | ||||
-rw-r--r-- | litmus/sched_mc2.c | 6 | ||||
-rw-r--r-- | litmus/sched_task_trace.c | 2 |
4 files changed, 31 insertions, 5 deletions
diff --git a/litmus/bank_proc.c b/litmus/bank_proc.c index 53c20db4463a..05c7fc3df98c 100644 --- a/litmus/bank_proc.c +++ b/litmus/bank_proc.c | |||
@@ -229,6 +229,14 @@ struct page *new_alloc_page(struct page *page, unsigned long node, int **x) | |||
229 | // Decode the node to decide what color pages we should provide | 229 | // Decode the node to decide what color pages we should provide |
230 | switch(node ){ | 230 | switch(node ){ |
231 | case 0: | 231 | case 0: |
232 | case 1: | ||
233 | case 2: | ||
234 | case 3: | ||
235 | color = (color%4) * 4 + node; | ||
236 | case 4: | ||
237 | color = (color%16); | ||
238 | /* | ||
239 | case 0: | ||
232 | case 1: | 240 | case 1: |
233 | case 2: | 241 | case 2: |
234 | case 3: | 242 | case 3: |
@@ -241,8 +249,8 @@ struct page *new_alloc_page(struct page *page, unsigned long node, int **x) | |||
241 | break; | 249 | break; |
242 | default: | 250 | default: |
243 | TRACE_CUR("Wrong color %lu\n", color); | 251 | TRACE_CUR("Wrong color %lu\n", color); |
244 | // printk(KERN_WARNING "Wrong color %lu\n", color); | ||
245 | return rPage; | 252 | return rPage; |
253 | */ | ||
246 | } | 254 | } |
247 | 255 | ||
248 | 256 | ||
diff --git a/litmus/cache_proc.c b/litmus/cache_proc.c index bb9d3414530f..68f68bfedf93 100644 --- a/litmus/cache_proc.c +++ b/litmus/cache_proc.c | |||
@@ -48,6 +48,11 @@ u32 way_partitions[5] = { | |||
48 | 0xFFFF00FF, /* lv C */ | 48 | 0xFFFF00FF, /* lv C */ |
49 | }; | 49 | }; |
50 | 50 | ||
51 | u32 set_partitions[2] = { | ||
52 | 0xFFFFFF00, /* cpuX A and B */ | ||
53 | 0xFFFF00FF, /* lv C */ | ||
54 | }; | ||
55 | |||
51 | u32 prev_lockdown_d_reg[5] = { | 56 | u32 prev_lockdown_d_reg[5] = { |
52 | 0x00000000, | 57 | 0x00000000, |
53 | 0x00000000, | 58 | 0x00000000, |
@@ -190,8 +195,8 @@ int lock_all_handler(struct ctl_table *table, int write, void __user *buffer, | |||
190 | writel_relaxed(nr_unlocked_way[0], ld_d_reg(i)); | 195 | writel_relaxed(nr_unlocked_way[0], ld_d_reg(i)); |
191 | writel_relaxed(nr_unlocked_way[0], ld_i_reg(i)); | 196 | writel_relaxed(nr_unlocked_way[0], ld_i_reg(i)); |
192 | } | 197 | } |
193 | print_lockdown_registers(); | ||
194 | } | 198 | } |
199 | print_lockdown_registers(); | ||
195 | 200 | ||
196 | out: | 201 | out: |
197 | mutex_unlock(&lockdown_proc); | 202 | mutex_unlock(&lockdown_proc); |
@@ -229,6 +234,9 @@ out: | |||
229 | 234 | ||
230 | void do_way_partition(enum crit_level lv, int cpu) | 235 | void do_way_partition(enum crit_level lv, int cpu) |
231 | { | 236 | { |
237 | if (use_set_partition == 1 && use_way_partition == 1) | ||
238 | printk(KERN_ALERT "BOTH SET, WAY ARE SET!!!!\n"); | ||
239 | |||
232 | if (use_way_partition == 1) { | 240 | if (use_way_partition == 1) { |
233 | if (lv < CRIT_LEVEL_C) { | 241 | if (lv < CRIT_LEVEL_C) { |
234 | writel_relaxed(way_partitions[cpu], ld_d_reg(cpu)); | 242 | writel_relaxed(way_partitions[cpu], ld_d_reg(cpu)); |
@@ -237,6 +245,14 @@ void do_way_partition(enum crit_level lv, int cpu) | |||
237 | writel_relaxed(way_partitions[4], ld_d_reg(cpu)); | 245 | writel_relaxed(way_partitions[4], ld_d_reg(cpu)); |
238 | writel_relaxed(way_partitions[4], ld_i_reg(cpu)); | 246 | writel_relaxed(way_partitions[4], ld_i_reg(cpu)); |
239 | } | 247 | } |
248 | } else if (use_set_partition == 1) { | ||
249 | if (lv < CRIT_LEVEL_C) { | ||
250 | writel_relaxed(set_partitions[0], ld_d_reg(cpu)); | ||
251 | writel_relaxed(set_partitions[0], ld_i_reg(cpu)); | ||
252 | } else { | ||
253 | writel_relaxed(set_partitions[1], ld_d_reg(cpu)); | ||
254 | writel_relaxed(set_partitions[1], ld_i_reg(cpu)); | ||
255 | } | ||
240 | } | 256 | } |
241 | } | 257 | } |
242 | 258 | ||
diff --git a/litmus/sched_mc2.c b/litmus/sched_mc2.c index aa6452a5732c..1c7cdfea836a 100644 --- a/litmus/sched_mc2.c +++ b/litmus/sched_mc2.c | |||
@@ -575,12 +575,13 @@ struct task_struct* mc2_dispatch(struct sup_reservation_environment* sup_env, st | |||
575 | 575 | ||
576 | /* no eligible level A or B tasks exists */ | 576 | /* no eligible level A or B tasks exists */ |
577 | /* check the ghost job */ | 577 | /* check the ghost job */ |
578 | /* | ||
578 | ce = &state->crit_entries[CRIT_LEVEL_C]; | 579 | ce = &state->crit_entries[CRIT_LEVEL_C]; |
579 | if (ce->running) { | 580 | if (ce->running) { |
580 | TRACE_TASK(ce->running," is GHOST\n"); | 581 | TRACE_TASK(ce->running," is GHOST\n"); |
581 | return NULL; | 582 | return NULL; |
582 | } | 583 | } |
583 | 584 | */ | |
584 | cur_priority = _lowest_prio_cpu.cpu_entries[state->cpu].deadline; | 585 | cur_priority = _lowest_prio_cpu.cpu_entries[state->cpu].deadline; |
585 | 586 | ||
586 | //TRACE("****** ACTIVE LIST ******\n"); | 587 | //TRACE("****** ACTIVE LIST ******\n"); |
@@ -858,6 +859,7 @@ static long mc2_complete_job(void) | |||
858 | local_irq_restore(flags); | 859 | local_irq_restore(flags); |
859 | preempt_enable(); | 860 | preempt_enable(); |
860 | } | 861 | } |
862 | |||
861 | sched_trace_task_completion(current, 0); | 863 | sched_trace_task_completion(current, 0); |
862 | 864 | ||
863 | /* update the next release time and deadline */ | 865 | /* update the next release time and deadline */ |
@@ -879,7 +881,7 @@ static long mc2_complete_job(void) | |||
879 | TRACE_CUR("TARDY: release=%llu now=%llu\n", get_release(current), litmus_clock()); | 881 | TRACE_CUR("TARDY: release=%llu now=%llu\n", get_release(current), litmus_clock()); |
880 | preempt_enable(); | 882 | preempt_enable(); |
881 | // if (get_task_crit_level(current) == CRIT_LEVEL_A) | 883 | // if (get_task_crit_level(current) == CRIT_LEVEL_A) |
882 | // sched_trace_task_release(current); | 884 | sched_trace_task_release(current); |
883 | } | 885 | } |
884 | 886 | ||
885 | TRACE_CUR("mc2_complete_job returns at %llu\n", litmus_clock()); | 887 | TRACE_CUR("mc2_complete_job returns at %llu\n", litmus_clock()); |
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index 933e7e4c7094..6224f8c625b1 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <litmus/feather_trace.h> | 15 | #include <litmus/feather_trace.h> |
16 | #include <litmus/ftdev.h> | 16 | #include <litmus/ftdev.h> |
17 | 17 | ||
18 | #define NO_EVENTS (1 << CONFIG_SCHED_TASK_TRACE_SHIFT) | 18 | #define NO_EVENTS (1 << (CONFIG_SCHED_TASK_TRACE_SHIFT+3)) |
19 | 19 | ||
20 | #define now() litmus_clock() | 20 | #define now() litmus_clock() |
21 | 21 | ||