lkml.org 
[lkml]   [2003]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] sched-2.5.64-D3, more interactivity changes

Hi Everyone,

I like Ingo's round down the sleep time fix. It solves most
of the problems.

I have been chasing a small case it doesn't fix. If you have
a circle of processes passing a token (like the irman test which
is part of contest), the processes can still get to inflated
priorities if they are preempted by other processes.

Consider one of the processes in the circle. It spends most of
its time blocked waiting for its turn to pass the token. With Ingo's
change it doesn't get a sleep time credit because the sleep time
almost always rounds down to zero. But if any of the process in
the loop is delayed (maybe it used its time slice), then all of the
other processes in the chain will get a sleep_avg credit for that
delay time.

Here is the idea I have been playing with (in activate_task):

sync_wake_cycle = 0
if (!in_interrupt()) {
/*
* Detect cycles of synchronous wakeups. This catches
* the old circle of processes passing a token benchmarks.
* If none of the processes ever sleep they should not
* get an interactive bonus.
*/
if (current->sync_wake_leader == p->sync_wake_leader)
sync_wake_cycle = 1;
else if (current->sync_wake_leader)
p->sync_wake_leader = current->sync_wake_leader;
else
p->sync_wake_leader = current;
} else {
p->sync_wake_leader = 0;
}

If sync_wake_cycle is set, don't credit the sleep_avg. If there is an
interactive task in the loop, it will break the loop when it is woken by
a real interrupt.

I hope to get another version of my run_avg based (and overly optimistically
named) self-tuning scheduler out soon.

Jim Houston - Concurrent Computer Corp.
-
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: 2005-03-22 13:34    [W:0.085 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site