diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:51 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:20:25 -0400 |
commit | 19810b4e1538f9e3994c65d20e1a8709f3e4e538 (patch) | |
tree | 1ab6e0bf6ea5b92d1e426c07c1531216f8841958 | |
parent | 74a69e4f0bee220103bba81891c168579494b14b (diff) |
Integrate SRP ceiling blocking callback with Linux scheduler
Check whether a suspension is required at end of schedule().
-rw-r--r-- | kernel/sched/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index cbf2995d3871..8c23af255271 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -87,6 +87,8 @@ | |||
87 | #include "../workqueue_internal.h" | 87 | #include "../workqueue_internal.h" |
88 | #include "../smpboot.h" | 88 | #include "../smpboot.h" |
89 | 89 | ||
90 | #include <litmus/litmus.h> | ||
91 | #include <litmus/ceiling.h> | ||
90 | #include <litmus/trace.h> | 92 | #include <litmus/trace.h> |
91 | #include <litmus/sched_trace.h> | 93 | #include <litmus/sched_trace.h> |
92 | 94 | ||
@@ -2858,6 +2860,8 @@ asmlinkage __visible void __sched schedule(void) | |||
2858 | do { | 2860 | do { |
2859 | __schedule(); | 2861 | __schedule(); |
2860 | } while (need_resched()); | 2862 | } while (need_resched()); |
2863 | |||
2864 | srp_ceiling_block(); | ||
2861 | } | 2865 | } |
2862 | EXPORT_SYMBOL(schedule); | 2866 | EXPORT_SYMBOL(schedule); |
2863 | 2867 | ||
@@ -2889,6 +2893,7 @@ void __sched schedule_preempt_disabled(void) | |||
2889 | { | 2893 | { |
2890 | sched_preempt_enable_no_resched(); | 2894 | sched_preempt_enable_no_resched(); |
2891 | schedule(); | 2895 | schedule(); |
2896 | srp_ceiling_block(); | ||
2892 | preempt_disable(); | 2897 | preempt_disable(); |
2893 | } | 2898 | } |
2894 | 2899 | ||
@@ -2905,6 +2910,7 @@ static void __sched notrace preempt_schedule_common(void) | |||
2905 | */ | 2910 | */ |
2906 | barrier(); | 2911 | barrier(); |
2907 | } while (need_resched()); | 2912 | } while (need_resched()); |
2913 | srp_ceiling_block(); | ||
2908 | } | 2914 | } |
2909 | 2915 | ||
2910 | #ifdef CONFIG_PREEMPT | 2916 | #ifdef CONFIG_PREEMPT |
@@ -2963,6 +2969,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_context(void) | |||
2963 | __preempt_count_sub(PREEMPT_ACTIVE); | 2969 | __preempt_count_sub(PREEMPT_ACTIVE); |
2964 | barrier(); | 2970 | barrier(); |
2965 | } while (need_resched()); | 2971 | } while (need_resched()); |
2972 | srp_ceiling_block(); | ||
2966 | } | 2973 | } |
2967 | EXPORT_SYMBOL_GPL(preempt_schedule_context); | 2974 | EXPORT_SYMBOL_GPL(preempt_schedule_context); |
2968 | #endif /* CONFIG_CONTEXT_TRACKING */ | 2975 | #endif /* CONFIG_CONTEXT_TRACKING */ |
@@ -2988,6 +2995,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void) | |||
2988 | __preempt_count_add(PREEMPT_ACTIVE); | 2995 | __preempt_count_add(PREEMPT_ACTIVE); |
2989 | local_irq_enable(); | 2996 | local_irq_enable(); |
2990 | __schedule(); | 2997 | __schedule(); |
2998 | srp_ceiling_block(); | ||
2991 | local_irq_disable(); | 2999 | local_irq_disable(); |
2992 | __preempt_count_sub(PREEMPT_ACTIVE); | 3000 | __preempt_count_sub(PREEMPT_ACTIVE); |
2993 | 3001 | ||