]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sched_rt.c
r8169: workaround against ignored TxPoll writes (8168)
[linux-2.6-omap-h63xx.git] / kernel / sched_rt.c
index 60591e2512b1434b9e5f873df5b1fef2313405e6..4b87476a02d0fec53239c896c8f2b210964b8f92 100644 (file)
@@ -73,7 +73,7 @@ static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p)
                resched_task(rq->curr);
 }
 
-static struct task_struct *pick_next_task_rt(struct rq *rq, u64 now)
+static struct task_struct *pick_next_task_rt(struct rq *rq)
 {
        struct rt_prio_array *array = &rq->rt.active;
        struct task_struct *next;
@@ -92,7 +92,7 @@ static struct task_struct *pick_next_task_rt(struct rq *rq, u64 now)
        return next;
 }
 
-static void put_prev_task_rt(struct rq *rq, struct task_struct *p, u64 now)
+static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
 {
        update_curr_rt(rq);
        p->se.exec_start = 0;
@@ -207,10 +207,15 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p)
                return;
 
        p->time_slice = static_prio_timeslice(p->static_prio);
-       set_tsk_need_resched(p);
 
-       /* put it at the end of the queue: */
-       requeue_task_rt(rq, p);
+       /*
+        * Requeue to the end of queue if we are not the only element
+        * on the queue:
+        */
+       if (p->run_list.prev != p->run_list.next) {
+               requeue_task_rt(rq, p);
+               set_tsk_need_resched(p);
+       }
 }
 
 static struct sched_class rt_sched_class __read_mostly = {