diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:59 -0400 |
commit | 1b9f19c2125dd1021b9327111dc40b14b557ee12 (patch) | |
tree | 139bfbf6f43fa957821f95ebc9c5f1d43b177271 /kernel | |
parent | bb29ab26863c022743143f27956cc0ca362f258c (diff) |
sched: turn on the use of unstable events
make use of sched-clock-unstable events.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6150cd70f448..2d23450e7614 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -68,13 +68,6 @@ unsigned long long __attribute__((weak)) sched_clock(void) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * CPU frequency is/was unstable - start new by setting prev_clock_raw: | ||
72 | */ | ||
73 | void sched_clock_unstable_event(void) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | /* | ||
78 | * Convert user-nice values [ -20 ... 0 ... 19 ] | 71 | * Convert user-nice values [ -20 ... 0 ... 19 ] |
79 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], | 72 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], |
80 | * and back. | 73 | * and back. |
@@ -630,6 +623,20 @@ static inline struct rq *this_rq_lock(void) | |||
630 | } | 623 | } |
631 | 624 | ||
632 | /* | 625 | /* |
626 | * CPU frequency is/was unstable - start new by setting prev_clock_raw: | ||
627 | */ | ||
628 | void sched_clock_unstable_event(void) | ||
629 | { | ||
630 | unsigned long flags; | ||
631 | struct rq *rq; | ||
632 | |||
633 | rq = task_rq_lock(current, &flags); | ||
634 | rq->prev_clock_raw = sched_clock(); | ||
635 | rq->clock_unstable_events++; | ||
636 | task_rq_unlock(rq, &flags); | ||
637 | } | ||
638 | |||
639 | /* | ||
633 | * resched_task - mark a task 'to be rescheduled now'. | 640 | * resched_task - mark a task 'to be rescheduled now'. |
634 | * | 641 | * |
635 | * On UP this means the setting of the need_resched flag, on SMP it | 642 | * On UP this means the setting of the need_resched flag, on SMP it |