[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJd=RBBok=g7WS5EAtE3sQyLtCKfn4h8rxQn9bAsDHnqPq8_mg@mail.gmail.com>
Date: Mon, 9 Jul 2012 20:23:31 +0800
From: Hillf Danton <dhillf@...il.com>
To: LKML <linux-kernel@...r.kernel.org>,
Hillf Danton <dhillf@...il.com>
Subject: [patch] BFS 421-1: fix yield_to
The time slice of local runqueue is bogus but updated in the main
schedule function.
SOB: Hillf Danton <dhillf@...il.com>
---
--- 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists