[patch] BFS 421-1: fix yield_to
From: Hillf Danton
Date: Mon Jul 09 2012 - 08:23:26 EST
The time slice of local runqueue is bogus but updated in the main
schedule function.
SOB: Hillf Danton <dhillf@xxxxxxxxx>
---
--- a/kernel/sched/bfs.c Mon Jul 9 20:05:00 2012
+++ b/kernel/sched/bfs.c Mon Jul 9 20:06:00 2012
@@ -4634,21 +4634,16 @@ EXPORT_SYMBOL(yield);
bool __sched yield_to(struct task_struct *p, bool preempt)
{
unsigned long flags;
- bool yielded = 0;
+ bool yielded = false;
struct rq *rq;
rq = this_rq();
grq_lock_irqsave(&flags);
if (task_running(p) || p->state)
goto out_unlock;
- yielded = 1;
+ yielded = true;
if (p->deadline > rq->rq_deadline)
p->deadline = rq->rq_deadline;
- p->time_slice += rq->rq_time_slice;
- rq->rq_time_slice = 0;
- if (p->time_slice > timeslice())
- p->time_slice = timeslice();
- set_tsk_need_resched(rq->curr);
out_unlock:
grq_unlock_irqrestore(&flags);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/