]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sched.c
[ARM] 3599/1: AT91RM9200 remove global variables
[linux-2.6-omap-h63xx.git] / kernel / sched.c
index 7b371931114f56b1c0a9b168364d412ab58bf72c..c13f1bd2df7d3cd483c47fd76a8163d90ed3cd44 100644 (file)
@@ -667,9 +667,13 @@ static int effective_prio(task_t *p)
 /*
  * __activate_task - move a task to the runqueue.
  */
-static inline void __activate_task(task_t *p, runqueue_t *rq)
+static void __activate_task(task_t *p, runqueue_t *rq)
 {
-       enqueue_task(p, rq->active);
+       prio_array_t *target = rq->active;
+
+       if (batch_task(p))
+               target = rq->expired;
+       enqueue_task(p, target);
        rq->nr_running++;
 }
 
@@ -688,7 +692,7 @@ static int recalc_task_prio(task_t *p, unsigned long long now)
        unsigned long long __sleep_time = now - p->timestamp;
        unsigned long sleep_time;
 
-       if (unlikely(p->policy == SCHED_BATCH))
+       if (batch_task(p))
                sleep_time = 0;
        else {
                if (__sleep_time > NS_MAX_SLEEP_AVG)
@@ -705,8 +709,7 @@ static int recalc_task_prio(task_t *p, unsigned long long now)
                 * active yet prevent them suddenly becoming cpu hogs and
                 * starving other processes.
                 */
-               if (p->mm && p->sleep_type != SLEEP_NONINTERACTIVE &&
-                       sleep_time > INTERACTIVE_SLEEP(p)) {
+               if (p->mm && sleep_time > INTERACTIVE_SLEEP(p)) {
                                unsigned long ceiling;
 
                                ceiling = JIFFIES_TO_NS(MAX_SLEEP_AVG -
@@ -3024,8 +3027,7 @@ go_idle:
                        dequeue_task(next, array);
                        next->prio = new_prio;
                        enqueue_task(next, array);
-               } else
-                       requeue_task(next, array);
+               }
        }
        next->sleep_type = SLEEP_NORMAL;
 switch_tasks:
@@ -4786,7 +4788,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action,
 /* Register at highest priority so that task migration (migrate_all_tasks)
  * happens before everything else.
  */
-static struct notifier_block __devinitdata migration_notifier = {
+static struct notifier_block migration_notifier = {
        .notifier_call = migration_call,
        .priority = 10
 };