linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helge Hafting <helgehaf@aitel.hist.no>
To: Timothy Miller <miller@techsource.com>
Cc: Nick Piggin <piggin@cyberone.com.au>,
	Con Kolivas <kernel@kolivas.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>
Subject: Re: Interactivity improvements
Date: Wed, 6 Aug 2003 22:09:24 +0200	[thread overview]
Message-ID: <20030806200924.GA5956@hh.idb.hist.no> (raw)
In-Reply-To: <3F314D6B.9090302@techsource.com>

On Wed, Aug 06, 2003 at 02:48:11PM -0400, Timothy Miller wrote:
> Here's a kooky idea...
> 
> I'm not sure about this detail, but I would guess that the int 
> schedulers are trying to determine relatively stable priority values for 
> processes.  A process does not instantly come to its correct priority 
> level, because it gets there based on accumulation of behavioral patterns.
> 
> Well, it occurs to me that we could benefit from situations where 
> priority changes are underdamped.  The results would sometimes be an 
> oscillation in priority levels.  In the short term, a given process may 
> be given different amounts of CPU time when it is run, although in the 
> long term, it should average out.
>
Possibly a good idea...
 
> At the same time, certain tasks can only be judged correctly over the 
> long term, like X, for example.  Its long-term behavior is interactive, 
> but now and then, it will become a CPU hog, and we want to LET it.
>
Possibly, but getting this detection right isn't easy.  There
are many other cases where processes such as the compiler do
so much disk access that it is interactive for some time, but
we definitely don't want it to become a hog at interactive
priority - ever.

There are also those who think that if X ever has so much to do 
(usually not because of graphichs acceleration) then it had
better wait because the X user isn't the only one waiting anyway.
(I.e. the machine is also a web/db/login server
or some such - so other people are waiting as well.)

> The idea I'm proposing, however poorly formed, is that if we allow some 
> "excessive" oscillation early on in the life of a process, we may be 
> able to more quickly get processes to NEAR its correct priority, OR get 
> its CPU time over the course of three times being run for the 
> underdamped case to be about the same as it would be if we knew in 
> advance what the priority should be.  But in the underdamped case, the 
> priority would continue to oscillate up and down around the correct 
> level, because we are intentionally overshooting the mark each time we 
> adjust priority.

More oscillation in the start than later will behave as you describe,
wether we want that is another issue.  Processes _can_
change between being hogs and interactive, and we want the
scheduler to pick up that fact quickly.

Example: a word processor is mostly interactive.  Sometimes it
does a heavy job like typesetting an entire book though, this is cpu
intensive and should schedule as such even if the word processor
has been "interactive" for a week.  (I never close it, linux
is so stable...)  It should do its heavy work with low priority
so it don't interfere with the interactive work (or gameplaying)
I do while waiting for the .pdf to appear.
I definitely don't want a 5-minute
typesetting run to monopolize the cpu just because the task
has been sooo nice over the last week.

Helge Hafting

  parent reply	other threads:[~2003-08-06 20:02 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 16:07 [PATCH] O13int for interactivity Con Kolivas
2003-08-04 18:24 ` Felipe Alfaro Solana
2003-08-04 19:15 ` Antonio Vargas
2003-08-04 21:32   ` Con Kolivas
2003-08-04 20:11 ` Mike Galbraith
2003-08-04 22:11   ` Con Kolivas
2003-08-05  7:10     ` Mike Galbraith
2003-08-05  2:11 ` Nick Piggin
2003-08-05  2:20   ` Con Kolivas
2003-08-05  2:21     ` Nick Piggin
2003-08-05  3:06       ` Con Kolivas
2003-08-05  3:17         ` Nick Piggin
2003-08-06 18:48           ` Interactivity improvements Timothy Miller
2003-08-06 19:01             ` Mike Fedyk
2003-08-06 20:09             ` Helge Hafting [this message]
2003-08-06 21:15             ` Con Kolivas
2003-08-05  3:18       ` [PATCH] O13int for interactivity Con Kolivas
2003-08-05  3:31         ` Nick Piggin
2003-08-05  5:04           ` Con Kolivas
2003-08-05  5:12             ` Nick Piggin
2003-08-05  5:16               ` Con Kolivas
2003-08-05  5:28                 ` Nick Piggin
2003-08-05 10:22                   ` Con Kolivas
2003-08-05 10:32                     ` Nick Piggin
2003-08-05 10:45                       ` Con Kolivas
2003-08-05 10:48                         ` Nick Piggin
2003-08-05 10:56                           ` Con Kolivas
2003-08-05 11:03                             ` Nick Piggin
2003-08-05 11:12                               ` Con Kolivas
2003-08-05 11:23                                 ` Nick Piggin
2003-08-05 11:34                                   ` Con Kolivas
2003-08-05 10:54                         ` Arjan van de Ven
2003-08-05 11:10                           ` Con Kolivas
2003-08-06 21:33                       ` Timothy Miller
2003-08-06 21:33                         ` Con Kolivas
2003-08-07  0:27                           ` Timothy Miller
2003-08-07  0:27                             ` Con Kolivas
2003-08-07  0:44                               ` Timothy Miller
2003-08-11  6:48                       ` Rob Landley
2003-08-11 15:47                         ` William Lee Irwin III
2003-08-12  2:51                         ` Nick Piggin
2003-08-12  6:16                           ` Mike Galbraith
2003-08-12  7:07                             ` Nick Piggin
2003-08-12  7:18                               ` Nick Piggin
2003-08-12  9:42                                 ` Mike Galbraith
2003-08-12 21:11                                   ` Mike Fedyk
2003-08-13  6:55                                     ` Mike Galbraith
2003-08-12  9:22                               ` Mike Galbraith
2003-08-12  9:37                                 ` Nick Piggin
2003-08-12  9:48                                   ` Mike Galbraith
2003-08-12 10:29                           ` Rob Landley
2003-08-12 11:08                             ` Nick Piggin
2003-08-12 11:35                               ` Rob Landley
2003-08-12 11:58                                 ` Nick Piggin
2003-08-13  2:08                                   ` jw schultz
2003-08-13  3:07                                     ` Gene Heskett
2003-08-13  3:24                                       ` Nick Piggin
2003-08-13  5:24                                         ` Gene Heskett
2003-08-13  5:43                                           ` Andrew McGregor
2003-08-13 12:33                                             ` Gene Heskett
2003-08-14  5:03                                               ` Andrew McGregor
2003-08-14 10:48                                                 ` Gene Heskett
2003-08-12 15:36                           ` Timothy Miller
2003-08-05  6:03             ` Andrew Morton
2003-08-05  7:26               ` Con Kolivas
2003-08-05  8:12                 ` Oliver Neukum
2003-08-05  8:20                   ` Con Kolivas
2003-08-05  8:27                     ` Mike Galbraith
2003-08-05  8:43                       ` Con Kolivas
2003-08-05  9:09                         ` Mike Galbraith
2003-08-05  9:19                           ` Con Kolivas
2003-08-05 10:04                   ` Nick Piggin
2003-08-11  6:57                 ` Rob Landley
2003-08-11 15:58                   ` William Lee Irwin III
2003-08-05  7:53               ` Mike Galbraith
2003-08-07 14:26 Interactivity improvements Patrick McLean
2003-08-07 15:24 ` Richard Curnow
2003-08-07 15:42   ` Patrick McLean
2003-08-07 18:33     ` Mike Fedyk
2003-08-07 20:48   ` William Lee Irwin III
2003-08-07 21:26     ` Bernd Eckenfels
2003-08-07 23:05       ` Timothy Miller
2003-08-07 15:31 ` Felipe Alfaro Solana
2003-08-07 17:41 ` Robert Love

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=20030806200924.GA5956@hh.idb.hist.no \
    --to=helgehaf@aitel.hist.no \
    --cc=akpm@osdl.org \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.com \
    --cc=mingo@elte.hu \
    --cc=piggin@cyberone.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).