diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_mc_ce.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/litmus/sched_mc_ce.c b/litmus/sched_mc_ce.c index af02dfdbb523..ce71ebef2100 100644 --- a/litmus/sched_mc_ce.c +++ b/litmus/sched_mc_ce.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <litmus/sched_mc.h> | 25 | #include <litmus/sched_mc.h> |
26 | #include <litmus/ce_domain.h> | 26 | #include <litmus/ce_domain.h> |
27 | 27 | ||
28 | #define FTRACE_CPU 6 | ||
29 | |||
28 | static struct sched_plugin mc_ce_plugin __cacheline_aligned_in_smp; | 30 | static struct sched_plugin mc_ce_plugin __cacheline_aligned_in_smp; |
29 | 31 | ||
30 | #define using_linux_plugin() (litmus == &linux_sched_plugin) | 32 | #define using_linux_plugin() (litmus == &linux_sched_plugin) |
@@ -566,6 +568,7 @@ static int cancel_all_timers(void) | |||
566 | TRACE("cancel all timers\n"); | 568 | TRACE("cancel all timers\n"); |
567 | 569 | ||
568 | for_each_online_cpu(cpu) { | 570 | for_each_online_cpu(cpu) { |
571 | if (cpu == FTRACE_CPU) continue; | ||
569 | dom = get_domain_for(cpu); | 572 | dom = get_domain_for(cpu); |
570 | ce_data = dom->data; | 573 | ce_data = dom->data; |
571 | ce_data->should_schedule = NULL; | 574 | ce_data->should_schedule = NULL; |
@@ -597,6 +600,7 @@ static void arm_all_timers(void) | |||
597 | TRACE("arm all timers\n"); | 600 | TRACE("arm all timers\n"); |
598 | 601 | ||
599 | for_each_online_cpu(cpu) { | 602 | for_each_online_cpu(cpu) { |
603 | if (cpu == FTRACE_CPU) continue; | ||
600 | dom = get_domain_for(cpu); | 604 | dom = get_domain_for(cpu); |
601 | ce_data = dom->data; | 605 | ce_data = dom->data; |
602 | pid_table = get_pid_table(cpu); | 606 | pid_table = get_pid_table(cpu); |
@@ -656,6 +660,7 @@ long mc_ce_activate_plugin_common(void) | |||
656 | #endif | 660 | #endif |
657 | 661 | ||
658 | for_each_online_cpu(cpu) { | 662 | for_each_online_cpu(cpu) { |
663 | if (cpu == FTRACE_CPU) continue; | ||
659 | dom = get_domain_for(cpu); | 664 | dom = get_domain_for(cpu); |
660 | ce_data = dom->data; | 665 | ce_data = dom->data; |
661 | ce_data->scheduled = NULL; | 666 | ce_data->scheduled = NULL; |
@@ -678,6 +683,7 @@ static long mc_ce_activate_plugin(void) | |||
678 | long ret; | 683 | long ret; |
679 | 684 | ||
680 | for_each_online_cpu(cpu) { | 685 | for_each_online_cpu(cpu) { |
686 | if (cpu == FTRACE_CPU) continue; | ||
681 | BUG_ON(NR_CPUS <= n); | 687 | BUG_ON(NR_CPUS <= n); |
682 | our_domains[cpu] = &per_cpu(_mc_ce_doms, cpu); | 688 | our_domains[cpu] = &per_cpu(_mc_ce_doms, cpu); |
683 | n++; | 689 | n++; |
@@ -696,6 +702,7 @@ static void clear_pid_entries(void) | |||
696 | int cpu, entry; | 702 | int cpu, entry; |
697 | 703 | ||
698 | for_each_online_cpu(cpu) { | 704 | for_each_online_cpu(cpu) { |
705 | if (cpu == FTRACE_CPU) continue; | ||
699 | pid_table = get_pid_table(cpu); | 706 | pid_table = get_pid_table(cpu); |
700 | pid_table->num_pid_entries = 0; | 707 | pid_table->num_pid_entries = 0; |
701 | pid_table->cycle_time = 0; | 708 | pid_table->cycle_time = 0; |
@@ -717,6 +724,7 @@ long mc_ce_deactivate_plugin_common(void) | |||
717 | int cpu; | 724 | int cpu; |
718 | cancel_all_timers(); | 725 | cancel_all_timers(); |
719 | for_each_online_cpu(cpu) { | 726 | for_each_online_cpu(cpu) { |
727 | if (cpu == FTRACE_CPU) continue; | ||
720 | per_cpu(domains, cpu) = NULL; | 728 | per_cpu(domains, cpu) = NULL; |
721 | } | 729 | } |
722 | return 0; | 730 | return 0; |
@@ -747,6 +755,7 @@ static int __init init_sched_mc_ce(void) | |||
747 | int cpu, err; | 755 | int cpu, err; |
748 | 756 | ||
749 | for_each_online_cpu(cpu) { | 757 | for_each_online_cpu(cpu) { |
758 | if (cpu == FTRACE_CPU) continue; | ||
750 | per_cpu(domains, cpu) = NULL; | 759 | per_cpu(domains, cpu) = NULL; |
751 | ce_lock = &per_cpu(_mc_ce_dom_locks, cpu); | 760 | ce_lock = &per_cpu(_mc_ce_dom_locks, cpu); |
752 | raw_spin_lock_init(ce_lock); | 761 | raw_spin_lock_init(ce_lock); |
@@ -861,6 +870,7 @@ static int proc_read_ce_file(char *page, char **start, off_t off, int count, | |||
861 | } | 870 | } |
862 | 871 | ||
863 | for_each_online_cpu(cpu) { | 872 | for_each_online_cpu(cpu) { |
873 | if (cpu == FTRACE_CPU) continue; | ||
864 | pid_table = get_pid_table(cpu); | 874 | pid_table = get_pid_table(cpu); |
865 | for (t = 0; t < pid_table->num_pid_entries; ++t) { | 875 | for (t = 0; t < pid_table->num_pid_entries; ++t) { |
866 | err = write_pid_entry(page + n, count - n, | 876 | err = write_pid_entry(page + n, count - n, |