From: Timothy Miller <miller@techsource.com>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: Mike Galbraith <efault@gmx.de>, Bill Davidsen <davidsen@tmr.com>,
linux-kernel@vger.kernel.org
Subject: Re: O(1) scheduler & interactivity improvements
Date: Thu, 26 Jun 2003 19:10:40 -0400 [thread overview]
Message-ID: <3EFB7D70.8010602@techsource.com> (raw)
In-Reply-To: 3EFAC408.4020106@aitel.hist.no
Helge Hafting wrote:
> How about _removing_ the io-wait bonus for waiting on pipes then?
> If you wait for disk io, someone else gets to use
> the cpu for their work. So you get a boost for
> giving up your share of time, waiting
> for that slow device.
>
> But if you wait for a pipe, you wait for some other
> cpu hog to do the first part of _your_ work.
> I.e. nobody else benefitted from your waiting,
> so you don't get any boost either.
>
> This solves the problem of someone artifically
> dividing up a job, using token passing
> to get unfair priority.
>
>
> This can be fine-tuned a bit: We may want the pipe-waiter
> to get a _little_ bonus at times, but that has to be
> subtracted from whatever bonus the process at the
> other end of the pipe has. I.e. no new bonus
> created, just shift some the existing bonus around.
> The "other end" may, after all, have gained legitimate
> bonus from waiting on the disk/network/paging/os, and passing
> some of that on to "clients" might make sense.
>
In other words:
Don't give pipe-waiting any kind of boost or penalty, but do balance the
interactivity points between entities at each end of the pipe.
So, if you're waiting on a pipe, but the other end is a CPU hog, then
since you don't get a boost (pipe wait), you don't give a boost to the
CPU hog, but since he's a CPU hog, he DOES share negative points with
you, lowering your priority.
Conversely, if a process is waiting on real I/O (disk, user input,
etc.), then it gets an interactivity boost that it can share with other
processes it's connected to via pipe.
Since most X clients only do pipe waiting on the server, then it's the X
server that gets the interactivity boost by waiting on user input, which
it can share with clients.
And since there is no effect from pipe wait, you can still judge a
process as interactive or not based on what it does when it's NOT
waiting on a pipe -- if it becomes a CPU hog THEN, you deduct points, etc.
Here's an interesting question: Would you often have a situation where
a process at one end of a pipe is a CPU hog, and the process at the
other end is interactive? Is that a problem?
If you're always adding or subtracting points, that situation could be
less than optimal, but you'll never get to the point where the
interactive process is believed to be a cpu hog or vice versa. The
points each process would be assessed at a faster rate than the sharing
between processes.
Do you want to always share points, or do you share only when something
wakes up from a pipe wait?
next prev parent reply other threads:[~2003-06-26 22:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-22 16:07 O(1) scheduler & interactivity improvements Felipe Alfaro Solana
2003-06-22 20:00 ` Davide Libenzi
2003-06-23 12:50 ` Jesse Pollard
2003-06-23 8:09 ` Helge Hafting
2003-06-23 10:18 ` Felipe Alfaro Solana
2003-06-23 16:21 ` Daniel Gryniewicz
2003-06-23 18:59 ` Felipe Alfaro Solana
2003-06-23 19:21 ` Memory? " Roger Larsson
2003-06-23 16:47 ` Helge Hafting
2003-06-24 18:12 ` Bill Davidsen
2003-06-25 21:41 ` Helge Hafting
[not found] ` <5.2.0.9.2.20030624215008.00ce73b8@pop.gmx.net>
2003-06-26 9:59 ` Helge Hafting
2003-06-26 10:39 ` Mike Galbraith
2003-06-26 14:50 ` Bill Davidsen
2003-06-26 23:10 ` Timothy Miller [this message]
[not found] ` <Pine.LNX.3.96.1030626104733.17562D-100000@gatekeeper.tmr.c om>
2003-06-27 6:36 ` Mike Galbraith
2003-06-27 8:18 ` Helge Hafting
2003-06-27 9:46 ` Mike Galbraith
2003-06-27 11:39 ` Helge Hafting
2003-06-27 12:18 ` Mike Galbraith
2003-06-28 3:51 ` Bill Davidsen
[not found] ` <Pine.LNX.3.96.1030627234408.25848A-100000@gatekeeper.tmr.c om>
2003-06-28 5:44 ` Mike Galbraith
2003-06-28 14:34 ` Helge Hafting
2003-06-29 6:08 ` Mike Galbraith
2003-06-30 13:37 ` Bill Davidsen
2003-06-27 6:54 ` jw schultz
-- strict thread matches above, loose matches on Subject: below --
2003-06-23 10:50 John Bradford
2003-06-23 11:22 ` Felipe Alfaro Solana
2003-06-23 11:36 ` Denis Vlasenko
2003-06-23 12:44 John Bradford
2003-06-23 16:32 ` Helge Hafting
2003-06-23 19:00 ` Felipe Alfaro Solana
2003-06-23 19:17 ` Helge Hafting
2003-06-24 22:41 ` Timothy Miller
2003-06-25 21:42 ` Helge Hafting
2003-06-25 23:16 ` Timothy Miller
2003-06-23 21:48 ` Bill Davidsen
2003-06-23 19:20 John Bradford
2003-06-23 23:32 John Bradford
2003-06-24 4:13 ` Bill Davidsen
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=3EFB7D70.8010602@techsource.com \
--to=miller@techsource.com \
--cc=davidsen@tmr.com \
--cc=efault@gmx.de \
--cc=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.