Re: BFS 420: try to preempt after checking priority

From: Hillf Danton
Date: Tue May 22 2012 - 08:45:12 EST


We will not try to preempt running tasks if no increment in priority,
to shorten the hold time of global run-queue lock.

--- a/kernel/sched/bfs.c Mon May 14 20:50:38 2012
+++ b/kernel/sched/bfs.c Tue May 22 20:03:58 2012
@@ -3853,7 +3853,8 @@ void rt_mutex_setprio(struct task_struct
resched_task(p);
if (queued) {
enqueue_task(p);
- try_preempt(p, rq);
+ if (prio < oldprio)
+ try_preempt(p, rq);
}

task_grq_unlock(&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/