From: Jim Houston <jim.houston@ccur.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Andrew Morton <akpm@digeo.com>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
joe.korty@ccur.com
Subject: Re: [patch] sched-2.5.64-D3, more interactivity changes
Date: Wed, 19 Mar 2003 11:51:00 -0500 [thread overview]
Message-ID: <3E789FF4.DFDE1248@ccur.com> (raw)
In-Reply-To: 5.2.0.9.2.20030319091819.00ca4bf0@pop.gmx.net
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.
next prev parent reply other threads:[~2003-03-19 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-17 10:21 [patch] sched-2.5.64-D3, more interactivity changes Ingo Molnar
2003-03-17 18:01 ` Martin J. Bligh
2003-03-19 5:52 ` Andrew Morton
2003-03-19 6:31 ` Joshua Kwan
2003-03-19 7:13 ` Jeremy Fitzhardinge
2003-03-19 8:21 ` Mike Galbraith
2003-03-19 16:37 ` Jeremy Fitzhardinge
2003-03-19 16:51 ` Jim Houston [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-18 0:28 Sean Estabrooks
2003-03-19 11:30 Felipe Alfaro Solana
2003-03-19 11:40 Felipe Alfaro Solana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E789FF4.DFDE1248@ccur.com \
--to=jim.houston@ccur.com \
--cc=akpm@digeo.com \
--cc=efault@gmx.de \
--cc=jeremy@goop.org \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox