public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ed Tomlinson <edt@aei.ca>
To: Mike Galbraith <efault@gmx.de>
Cc: Con Kolivas <kernel@kolivas.org>, Ingo Molnar <mingo@elte.hu>,
	linux list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	ck list <ck@vds.kolivas.org>
Subject: Re: Ten percent test
Date: Mon, 9 Apr 2007 07:26:00 -0400	[thread overview]
Message-ID: <200704090726.01928.edt@aei.ca> (raw)
In-Reply-To: <1176097101.6355.89.camel@Homer.simpson.net>

On Monday 09 April 2007 01:38, Mike Galbraith wrote:
> On Sun, 2007-04-08 at 09:08 -0400, Ed Tomlinson wrote:
> > Hi,
> > 
> > I am one of those who have been happily testing Con's patches.  
> > 
> > They work better than mainline here.
> 
> (I tried a UP kernel yesterday, and even a single kernel build would
> make noticeable hitches if I move a window around. YMMV etc.)

Interesting.  I run UP amd64, 1000HZ, 1.25G, preempt off (on causes kernel 
stalls with no messages - but that is another story).  I do not notice a single 
make.   When several are running the desktop slows down a bit.  I do not have 
X niced.  Wonder why we see such different results? 

I am not saying that SD is perfect - I fully expect that more bugs will turn up
in its code (some will affect mainline too).  I do however like the idea of a 
scheduler that does not need alchemy to achieve good results.  Nor do I
necessarily expect it to be 100% transparent.  If one changes something
as basic as the scheduler some tweaking should be expected.  IMO this
is fine as long as we get consistant results.

> > If one really needs some sort of interactivity booster (I do not with SD), why
> > not move it into user space?  With SD it would be simple enough to export
> > some info on estimated latency.  With this user space could make a good
> > attempt to keep latency within bounds for a set of tasks just by renicing.... 
> 
> I don't think you can have very much effect on latency using nice with
> SD once the CPU is fully utilized.  See below.
> 
> /*
>  * This contains a bitmap for each dynamic priority level with empty slots
>  * for the valid priorities each different nice level can have. It allows
>  * us to stagger the slots where differing priorities run in a way that
>  * keeps latency differences between different nice levels at a minimum.
>  * ie, where 0 means a slot for that priority, priority running from left to
>  * right:
>  * nice -20 0000000000000000000000000000000000000000
>  * nice -10 1001000100100010001001000100010010001000
>  * nice   0 0101010101010101010101010101010101010101
>  * nice   5 1101011010110101101011010110101101011011
>  * nice  10 0110111011011101110110111011101101110111
>  * nice  15 0111110111111011111101111101111110111111
>  * nice  19 1111111111111111111011111111111111111111
>  */
> 
> Nice allocates bandwidth, but as long as the CPU is busy, tasks always
> proceed downward in priority until they hit the expired array.  That's
> the design.  If X gets busy and expires, and a nice 20 CPU hog wakes up
> after it's previous rotation has ended, but before the current rotation
> is ended (ie there is 1 task running at wakeup time), X will take a
> guaranteed minimum 160ms latency hit (quite noticeable) independent of
> nice level.  The only way to avoid it is to use a realtime class.
> 
> A nice -20 task has maximum bandwidth allocated, but that also makes it
> a bigger target for preemption from tasks at all nice levels as it
> proceeds downward toward expiration.  AFAIKT, low latency scheduling
> just isn't possible once the CPU becomes 100% utilized, but it is
> bounded to runqueue length.  In mainline OTOH, a nice -20 task will
> always preempt a nice 0 task, giving it instant gratification, and
> latency of lower priority tasks is bounded by the EXPIRED_STARVING(rq)
> safety net.

Mike I made no mention of low latency.  I did mention predictable latency.  If
you are 100% utilized, and have a nice -20 task cpu hog, I would expect it to run 
and that it _should_ affect other tasks - thats why it runs with -20...

This is why I suggest that user space may be a better place to boost interactive
tasks.  A daemon that posted a message telling me that the nice -20 cpu hog
is causing 300ms delays for X would, IMHO, be a good thing.  That same daemon
could then propose a fix telling me the expected latencies and let me decide if 
I want to change priorities.  It could also be set to automaticily adjust nice levels...

Thanks
Ed

  reply	other threads:[~2007-04-09 11:26 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 16:37 [PATCH] sched: staircase deadline misc fixes Con Kolivas
2007-03-28 17:34 ` [ck] " Prakash Punnoor
2007-04-01  6:40   ` Prakash Punnoor
     [not found]     ` <b14e81f00704010724i3155a16en91074ab789416f3d@mail.gmail.com>
2007-04-01 20:03       ` Prakash Punnoor
2007-03-28 18:48 ` Ingo Molnar
2007-03-28 23:44   ` Con Kolivas
2007-03-29  5:50     ` Mike Galbraith
2007-03-29  6:29       ` Mike Galbraith
2007-03-29  6:54         ` Mike Galbraith
2007-03-29  8:18       ` Mike Galbraith
2007-03-29 12:55         ` [ck] " michael chang
2007-04-03  2:35         ` Con Kolivas
2007-04-03  2:37       ` Con Kolivas
2007-04-03  5:31         ` Mike Galbraith
2007-04-03  6:00           ` Mike Galbraith
2007-04-03  6:01           ` Ingo Molnar
2007-04-03  6:11             ` Mike Galbraith
2007-04-05 11:02             ` Mike Galbraith
2007-04-05 11:09               ` Ingo Molnar
2007-04-05 11:12                 ` Mike Galbraith
2007-04-05 11:15                   ` Ingo Molnar
2007-04-05 13:18                   ` Johannes Stezenbach
2007-04-05 15:28                     ` Mike Galbraith
2007-04-05 11:54               ` [test] sched: SD-latest versus Mike's latest Ingo Molnar
2007-04-05 12:10                 ` Mike Galbraith
2007-04-05 12:12                   ` Ingo Molnar
2007-04-05 12:24                     ` Mike Galbraith
2007-04-05 16:08                 ` Con Kolivas
2007-04-05 19:05                   ` Ingo Molnar
2007-04-05 20:29                   ` Mike Galbraith
2007-04-06  1:03                 ` Ten percent test Con Kolivas
2007-04-06  9:07                   ` Mike Galbraith
2007-04-06  9:28                     ` Con Kolivas
2007-04-06 10:03                       ` Ingo Molnar
2007-04-06 10:40                         ` Mike Galbraith
2007-04-07  6:50                         ` Con Kolivas
2007-04-07 16:12                           ` Gene Heskett
2007-04-07 18:08                             ` Ingo Molnar
2007-04-07 18:23                               ` Gene Heskett
2007-04-07 18:52                                 ` Ingo Molnar
2007-04-07 20:30                                   ` Gene Heskett
2007-04-08 10:41                                     ` Ingo Molnar
2007-04-08 10:58                                       ` Ingo Molnar
2007-04-08 17:04                                         ` Gene Heskett
2007-04-09  4:03                                           ` Mike Galbraith
2007-04-09  4:08                                             ` Gene Heskett
2007-04-09  5:59                                               ` Mike Galbraith
2007-04-09 13:01                                                 ` Gene Heskett
2007-04-08 11:33                                       ` Gene Heskett
2007-04-08 11:40                                         ` Mike Galbraith
2007-04-08 12:02                                           ` Mike Galbraith
2007-04-08 17:57                                             ` Gene Heskett
2007-04-09  4:19                                               ` Mike Galbraith
2007-04-09  5:23                                                 ` Gene Heskett
2007-04-09  6:09                                                   ` Mike Galbraith
2007-04-08 17:56                                           ` Gene Heskett
2007-04-09  4:17                                             ` Mike Galbraith
2007-04-09  5:16                                               ` Gene Heskett
2007-04-09  6:06                                                 ` Mike Galbraith
2007-04-09  8:24                                                 ` Mike Galbraith
2007-04-08 18:51                                       ` Rene Herman
2007-04-09  4:23                                         ` Mike Galbraith
2007-04-09 12:14                                           ` Rene Herman
2007-04-09 13:27                                             ` Andreas Mohr
2007-04-09 19:54                                               ` Rene Herman
2007-04-09 14:15                                             ` Ingo Molnar
2007-04-09 17:05                                               ` Rene Herman
2007-04-09 17:48                                                 ` Ingo Molnar
2007-04-09 19:09                                                   ` Rene Herman
2007-04-09 19:56                                                   ` Gene Heskett
2007-04-09 17:10                                             ` Mike Galbraith
2007-04-09 13:53                                         ` Ingo Molnar
2007-04-09 15:37                                           ` Rene Herman
2007-04-07 19:14                               ` Mike Galbraith
2007-04-07 20:31                                 ` Gene Heskett
2007-04-09 17:51                                 ` William Lee Irwin III
2007-04-09 18:03                                   ` Ingo Molnar
2007-04-09 18:44                                     ` William Lee Irwin III
2007-04-07 16:32                           ` Mike Galbraith
2007-04-08 13:08                           ` Ed Tomlinson
2007-04-09  5:38                             ` Mike Galbraith
2007-04-09 11:26                               ` Ed Tomlinson [this message]
2007-04-09 16:50                                 ` Mike Galbraith
2007-04-22 10:48                                   ` [ck] " Martin Steigerwald
2007-04-22 11:15                                     ` Con Kolivas
2007-04-10  2:39                               ` Mike Galbraith
2007-04-10 11:23                                 ` Ed Tomlinson
2007-04-10 12:04                                   ` Mike Galbraith
2007-04-06 10:48                       ` Mike Galbraith
2007-04-03 10:57           ` [PATCH] sched: staircase deadline misc fixes Mike Galbraith
2007-03-29  6:36 ` Con Kolivas
2007-04-23  8:58 ` Andrew Morton

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=200704090726.01928.edt@aei.ca \
    --to=edt@aei.ca \
    --cc=akpm@linux-foundation.org \
    --cc=ck@vds.kolivas.org \
    --cc=efault@gmx.de \
    --cc=kernel@kolivas.org \
    --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