aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-09-06 05:15:04 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-10-18 16:14:06 -0400
commitce313ac8c1531c11d670fd84fe2526bbb5f32f85 (patch)
tree3755aa50dcf228aa441393e7fdb118664cd4f7e2 /kernel
parenta481c27ddd7d324a9f311ae9a08228499dbb7f7b (diff)
Move SCHED2 trace points to post_schedule()
Linux's post_schedule() scheduling class hook more closely matches what SCHED2 is supposed to trace, namely any scheduling overhead after the context switch. The prior trace points caught timers being armed from finish_switch(), which is already included in the context switch cost CXS. (This patch essentially reverts 8fe2fb8bb1c1cd0194608bc783d0ce7029e8d869).
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 1d7b38a7ff25..c4b6bd5151ff 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4417,14 +4417,20 @@ litmus_need_resched_nonpreemptible:
4417 raw_spin_unlock_irq(&rq->lock); 4417 raw_spin_unlock_irq(&rq->lock);
4418 } 4418 }
4419 4419
4420 TS_SCHED2_START(prev);
4420 sched_trace_task_switch_to(current); 4421 sched_trace_task_switch_to(current);
4421 4422
4422 post_schedule(rq); 4423 post_schedule(rq);
4423 4424
4424 if (sched_state_validate_switch()) 4425 if (sched_state_validate_switch()) {
4426 TS_SCHED2_END(prev);
4425 goto litmus_need_resched_nonpreemptible; 4427 goto litmus_need_resched_nonpreemptible;
4428 }
4426 4429
4427 preempt_enable_no_resched(); 4430 preempt_enable_no_resched();
4431
4432 TS_SCHED2_END(prev);
4433
4428 if (need_resched()) 4434 if (need_resched())
4429 goto need_resched; 4435 goto need_resched;
4430 4436