diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-01-25 15:08:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:29 -0500 |
commit | 8f4d37ec073c17e2d4aa8851df5837d798606d6f (patch) | |
tree | a9ac9063eca53e4d0110e8086f55241ea70ba993 /include/linux/sched.h | |
parent | 02b67cc3ba36bdba351d6c3a00593f4ec550d9d3 (diff) |
sched: high-res preemption tick
Use HR-timers (when available) to deliver an accurate preemption tick.
The regular scheduler tick that runs at 1/HZ can be too coarse when nice
level are used. The fairness system will still keep the cpu utilisation 'fair'
by then delaying the task that got an excessive amount of CPU time but try to
minimize this by delivering preemption points spot-on.
The average frequency of this extra interrupt is sched_latency / nr_latency.
Which need not be higher than 1/HZ, its just that the distribution within the
sched_latency period is important.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7907845c2348..43e0339d65fc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -257,6 +257,7 @@ extern void trap_init(void); | |||
257 | extern void account_process_tick(struct task_struct *task, int user); | 257 | extern void account_process_tick(struct task_struct *task, int user); |
258 | extern void update_process_times(int user); | 258 | extern void update_process_times(int user); |
259 | extern void scheduler_tick(void); | 259 | extern void scheduler_tick(void); |
260 | extern void hrtick_resched(void); | ||
260 | 261 | ||
261 | extern void sched_show_task(struct task_struct *p); | 262 | extern void sched_show_task(struct task_struct *p); |
262 | 263 | ||
@@ -849,7 +850,7 @@ struct sched_class { | |||
849 | #endif | 850 | #endif |
850 | 851 | ||
851 | void (*set_curr_task) (struct rq *rq); | 852 | void (*set_curr_task) (struct rq *rq); |
852 | void (*task_tick) (struct rq *rq, struct task_struct *p); | 853 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
853 | void (*task_new) (struct rq *rq, struct task_struct *p); | 854 | void (*task_new) (struct rq *rq, struct task_struct *p); |
854 | void (*set_cpus_allowed)(struct task_struct *p, cpumask_t *newmask); | 855 | void (*set_cpus_allowed)(struct task_struct *p, cpumask_t *newmask); |
855 | 856 | ||