diff options
author | Anton Altaparmakov <aia21@hera.kernel.org> | 2006-03-23 09:39:08 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@hera.kernel.org> | 2006-03-23 09:39:08 -0500 |
commit | 74293759002aa7db0179158c20676a034614577b (patch) | |
tree | 030ef62361042d1a034087ad9a726db3b57bba72 /kernel/sched.c | |
parent | bb8047d3540affd6b8c2adac3fe792e07143be0f (diff) | |
parent | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (diff) |
Merge branch 'master' of /home/aia21/ntfs-2.6/
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 12d291bf3379..6b6e0d70eb30 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -178,13 +178,6 @@ static unsigned int task_timeslice(task_t *p) | |||
178 | #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ | 178 | #define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ |
179 | < (long long) (sd)->cache_hot_time) | 179 | < (long long) (sd)->cache_hot_time) |
180 | 180 | ||
181 | void __put_task_struct_cb(struct rcu_head *rhp) | ||
182 | { | ||
183 | __put_task_struct(container_of(rhp, struct task_struct, rcu)); | ||
184 | } | ||
185 | |||
186 | EXPORT_SYMBOL_GPL(__put_task_struct_cb); | ||
187 | |||
188 | /* | 181 | /* |
189 | * These are the runqueue data structures: | 182 | * These are the runqueue data structures: |
190 | */ | 183 | */ |
@@ -714,12 +707,6 @@ static int recalc_task_prio(task_t *p, unsigned long long now) | |||
714 | DEF_TIMESLICE); | 707 | DEF_TIMESLICE); |
715 | } else { | 708 | } else { |
716 | /* | 709 | /* |
717 | * The lower the sleep avg a task has the more | ||
718 | * rapidly it will rise with sleep time. | ||
719 | */ | ||
720 | sleep_time *= (MAX_BONUS - CURRENT_BONUS(p)) ? : 1; | ||
721 | |||
722 | /* | ||
723 | * Tasks waking from uninterruptible sleep are | 710 | * Tasks waking from uninterruptible sleep are |
724 | * limited in their sleep_avg rise as they | 711 | * limited in their sleep_avg rise as they |
725 | * are likely to be waiting on I/O | 712 | * are likely to be waiting on I/O |
@@ -4028,6 +4015,8 @@ static inline void __cond_resched(void) | |||
4028 | */ | 4015 | */ |
4029 | if (unlikely(preempt_count())) | 4016 | if (unlikely(preempt_count())) |
4030 | return; | 4017 | return; |
4018 | if (unlikely(system_state != SYSTEM_RUNNING)) | ||
4019 | return; | ||
4031 | do { | 4020 | do { |
4032 | add_preempt_count(PREEMPT_ACTIVE); | 4021 | add_preempt_count(PREEMPT_ACTIVE); |
4033 | schedule(); | 4022 | schedule(); |
@@ -4333,6 +4322,7 @@ void __devinit init_idle(task_t *idle, int cpu) | |||
4333 | runqueue_t *rq = cpu_rq(cpu); | 4322 | runqueue_t *rq = cpu_rq(cpu); |
4334 | unsigned long flags; | 4323 | unsigned long flags; |
4335 | 4324 | ||
4325 | idle->timestamp = sched_clock(); | ||
4336 | idle->sleep_avg = 0; | 4326 | idle->sleep_avg = 0; |
4337 | idle->array = NULL; | 4327 | idle->array = NULL; |
4338 | idle->prio = MAX_PRIO; | 4328 | idle->prio = MAX_PRIO; |