diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2012-05-08 12:56:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-09 09:23:17 -0400 |
commit | cb04ff9ac424d0e689d9b612e9f73cb443ab4b7e (patch) | |
tree | 7335f4ca82dc0366ffbf9dc8de5396259213435a /kernel/sched | |
parent | 8b1e13638d465863572c8207a5cfceeef0cf0441 (diff) |
sched, perf: Use a single callback into the scheduler
We can easily use a single callback for both sched-in and sched-out. This
reduces the code footprint in the scheduler path as well as removes
the PMU black spot otherwise present between the out and in callback.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-o56ajxp1edwqg6x9d31wb805@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4603b9d8f30a..5c692a0a555d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1913,7 +1913,7 @@ prepare_task_switch(struct rq *rq, struct task_struct *prev, | |||
1913 | struct task_struct *next) | 1913 | struct task_struct *next) |
1914 | { | 1914 | { |
1915 | sched_info_switch(prev, next); | 1915 | sched_info_switch(prev, next); |
1916 | perf_event_task_sched_out(prev, next); | 1916 | perf_event_task_sched(prev, next); |
1917 | fire_sched_out_preempt_notifiers(prev, next); | 1917 | fire_sched_out_preempt_notifiers(prev, next); |
1918 | prepare_lock_switch(rq, next); | 1918 | prepare_lock_switch(rq, next); |
1919 | prepare_arch_switch(next); | 1919 | prepare_arch_switch(next); |
@@ -1956,13 +1956,6 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev) | |||
1956 | */ | 1956 | */ |
1957 | prev_state = prev->state; | 1957 | prev_state = prev->state; |
1958 | finish_arch_switch(prev); | 1958 | finish_arch_switch(prev); |
1959 | #ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
1960 | local_irq_disable(); | ||
1961 | #endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */ | ||
1962 | perf_event_task_sched_in(prev, current); | ||
1963 | #ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
1964 | local_irq_enable(); | ||
1965 | #endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */ | ||
1966 | finish_lock_switch(rq, prev); | 1959 | finish_lock_switch(rq, prev); |
1967 | finish_arch_post_lock_switch(); | 1960 | finish_arch_post_lock_switch(); |
1968 | 1961 | ||