lkml.org 
[lkml]   [2007]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kaffeine problem with CFS
On Wed, Apr 18, 2007 at 05:48:11PM +0200, Ingo Molnar wrote:
> static void requeue_task_fair(struct rq *rq, struct task_struct *p)
> {
> dequeue_task_fair(rq, p);
> p->on_rq = 0;
> - enqueue_task_fair(rq, p);
> + /*
> + * Temporarily insert at the last position of the tree:
> + */
> + p->fair_key = LLONG_MAX;
> + __enqueue_task_fair(rq, p);
> p->on_rq = 1;
> +
> + /*
> + * Update the key to the real value, so that when all other
> + * tasks from before the rightmost position have executed,
> + * this task is picked up again:
> + */
> + p->fair_key = rq->fair_clock - p->wait_runtime + p->nice_offset;

At this point you might as well call the requeue operation something
having to do with yield. I also suspect what goes on during the timer
tick may eventually become something different from requeueing the
current task, and furthermore class-dependent.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-18 18:11    [W:0.396 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site