mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Hafting <helgehaf@aitel.hist.no>
To: Bill Davidsen <davidsen@tmr.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: O(1) scheduler & interactivity improvements
Date: Wed, 25 Jun 2003 23:41:19 +0200	[thread overview]
Message-ID: <20030625214119.GA2753@hh.idb.hist.no> (raw)
In-Reply-To: <Pine.LNX.3.96.1030624140933.6519A-100000@gatekeeper.tmr.com>

On Tue, Jun 24, 2003 at 02:12:20PM -0400, Bill Davidsen wrote:
> On Mon, 23 Jun 2003, Helge Hafting wrote:
> 
> > On Mon, Jun 23, 2003 at 12:18:29PM +0200, Felipe Alfaro Solana wrote:
> 
> > > I don't consider compiling the kernel an interactive process as it's
> > > done almost automatically without any user intervention. XMMS is not a
> > > complete interactive application as it spends most of the time decoding
> > > and playing sound.
> > > 
> > A kernel compile isn't interactive - sure.  It may get some boosts
> > anyway for io waiting.  This quite correctly puts it above a
> > pure cpu hog like a mandelbrot calculation.
> 
> Why? Not why does the scheduler do that, but why *should* a compile be in
> any way more deserving that a Mandelbrot? It isn't obvious to me that
> either are interacting with the user, and if they are it would be the
> Mandelbrot doing realtime display.

This has nothing to do with "interacting with the user", the sleep-based
priority system solves other problems as well.  A pure cpu hog
utilizes all the cpu it gets.  A compile will end up waiting a lot for io
because it reads input files.  This starves the compile, the cpu hog
utilizes all of its timeslices plus the time the compile waits.
This is rectified by giving the compile a boost whenever it waits
(and lets someone else have the cpu).  This avoids penalizing processes
just because they do io or lots of io.  Readers would otherwise
progress very slowly in the precense of cpu hogs.

Incidentally, this also helps interactivity a lot because interactive
programs tend to wait for user input in the form of io, and when
they get it they get a boost and process the user input quickly.


As for my mandelbrot/compile example - the kernel cannot know
wether you:
* are busy watching fractals and just do a background compile,
or:
* wait for an important compile and pass some time rendering fractals
  when the compiler stall reading.

But you can tell it using explicit "nice"

Helge Hafting

  reply	other threads:[~2003-06-25 21:21 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 16:07 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 [this message]
     [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
     [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
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=20030625214119.GA2753@hh.idb.hist.no \
    --to=helgehaf@aitel.hist.no \
    --cc=davidsen@tmr.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®