aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:49 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 06:21:19 -0400
commit0db6e11e49f7bc4893ffff4d8a7af1235894d986 (patch)
tree062186c38cf5752b550d116d4ad7ece3472e3c34 /kernel/sched/core.c
parent4d6bd5eaa2e1e06d0957376d6e49e6b76ca88db5 (diff)
Integrate preemption state machine with Linux scheduler
Track when a processor is going to schedule "soon".
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 50f9f4c45ce9..377273d6cecc 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2294,6 +2294,10 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev)
2294 preempt_disable(); 2294 preempt_disable();
2295 rq = finish_task_switch(prev); 2295 rq = finish_task_switch(prev);
2296 post_schedule(rq); 2296 post_schedule(rq);
2297
2298 if (sched_state_validate_switch())
2299 litmus_reschedule_local();
2300
2297 preempt_enable(); 2301 preempt_enable();
2298 2302
2299 if (current->set_child_tid) 2303 if (current->set_child_tid)
@@ -2745,6 +2749,7 @@ static void __sched __schedule(void)
2745 int cpu; 2749 int cpu;
2746 2750
2747 preempt_disable(); 2751 preempt_disable();
2752 sched_state_entered_schedule();
2748 cpu = smp_processor_id(); 2753 cpu = smp_processor_id();
2749 rq = cpu_rq(cpu); 2754 rq = cpu_rq(cpu);
2750 rcu_note_context_switch(); 2755 rcu_note_context_switch();
@@ -2819,6 +2824,9 @@ static void __sched __schedule(void)
2819 2824
2820 post_schedule(rq); 2825 post_schedule(rq);
2821 2826
2827 if (unlikely(sched_state_validate_switch()))
2828 litmus_reschedule_local();
2829
2822 sched_preempt_enable_no_resched(); 2830 sched_preempt_enable_no_resched();
2823 2831
2824 TS_SCHED2_END(prev); 2832 TS_SCHED2_END(prev);