linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Andrew Morton <akpm@digeo.com>, Robert Love <rml@tech9.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [patch] "HT scheduler", sched-2.5.63-B3
Date: Thu, 6 Mar 2003 18:50:08 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.44.0303061841480.15041-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0303060912370.7206-100000@home.transmeta.com>


On Thu, 6 Mar 2003, Linus Torvalds wrote:

> this is the part we're "throwing away", because the sleeper had already
> accumulated enough interactivity points.
> 
> 	" + current->sleep_avg"
> 
> this is the part that the waker _already_had_.
> 
> 	if (ticks > MAX_SLEEP_AVG)
> 		ticks = MAX_SLEEP_AVG;
> 
> This just says that the waker, too, will be limited by the "maximum 
> interactivity" thing.

ok. I misread this part. It's actually a 'super boost' for interactive
tasks and tasks related to them.

> 	if (!in_interrupt())
> 		current->sleep_avg = ticks;

this (making a difference in characteristics based on in_interrupt()) was
something i tried before, but got killed due to generic wackyness :-)  
Also, it's not really justified to isolate a process just because it got
woken up by a hw event.

> and this part says "we only give the potential boost to a _synchronous_
> waker" (ie a network packet that comes in and wakes somebody up in
> bottom half processing will _not_ cause an interactivity boost to a
> random process).

how about a keyboard interrupt?

> See? The patch maintains the rule that "interactivity" only gets created
> by sleeping. The only thing it really does is to change how we
> _distribute_ the interactivity we get. It gives some of the
> interactivity to the waker.

yes - i misunderstood this property of it - and this removed most of my
objections.

> Also, note how your "waiting for gcc to finish" is still not true. Sure,
> that "make" will be considered interactive, but it's not going to help
> the waker (gcc) any, since it will be interactive waiting for gcc to
> _die_.

there's also another phenomenon in the 'make -j5 hell': gas getting
boosted due to it waiting on the gcc pipeline. Now gcc will be 'back
boosted'. But we might be lucky and get away with it - testing will show.

>  - "cc1" (slow) writes to a pipe to "as" (fast)
> 
>    "as" is fast, so as ends up waiting most of the time. Thus it ends up 
>    being marked interactive.
> 
>    When cc1 wakes up as, assuming as has been marked "maximally 
>    interactive", cc1 will get an interactivity boost too.
> 
> Is this "wrong"?  Maybe, if you see it from a pure "interactivity"  
> standpoint. But another way of seeing it is to say that it automatically
> tries to _balance_ this kind of pipeline - since "cc1" is much slower
> and actually _wants_ the interactivity that "as" is clearly not ever
> going to actually get any real advantage from, it is actually likely to
> be perfectly fine give "cc1" a priority.

okay.

> In short, it's all about balancing. There are things that are
> "pro-interactive" (real sleeping), and there are things that are
> "anti-interactive" (using up your timeslice). The question is how you
> spread out the bonus points (or the negative points).

yes.

> The current scheduler doesn't spread them out at all. I think that's a
> bug, since pipelines of multiple processes are actually perfectly
> common, and X is only one example of this.

i have tried multiple schemes before to spread out interactivity, none
worked so far - but i have not tried any 'back-boosting' towards a CPU-hog
before, so it's an interesting experiment. If you look at the
child-timeslice thing that is a common vector for interactivity to spread.

> And my patch may spread it out _too_ much. Maybe we shouldn't give _all_
> of the left-over interactivity to the waker. Maybe we should give just
> half of it away..

yes, not spreading out could also make it possible to give it back via
multiple wakeup links, interactivity will 'diffuse' along wakeups.

	Ingo


  parent reply	other threads:[~2003-03-06 17:39 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28  9:50 [patch] "HT scheduler", sched-2.5.63-B3 Ingo Molnar
2003-02-28 21:12 ` Andrew Morton
2003-02-28 21:23   ` Robert Love
2003-03-01  4:25     ` Andrew Morton
2003-03-06  3:20       ` Linus Torvalds
2003-03-06  7:45         ` Andrew Morton
2003-03-06  7:47           ` Ingo Molnar
2003-03-06 15:07             ` Linus Torvalds
2003-03-06 16:54               ` Ingo Molnar
2003-03-06 17:03                 ` Linus Torvalds
2003-03-06 17:24                   ` Ingo Molnar
2003-03-06 17:42                     ` Linus Torvalds
2003-03-06 17:54                       ` Ingo Molnar
2003-03-06 18:02                         ` Linus Torvalds
2003-03-06 18:11                           ` Ingo Molnar
2003-03-06 17:55                       ` John Levon
2003-03-06 18:07                         ` Linus Torvalds
2003-03-06 18:11                           ` John Levon
2003-03-06 18:16                             ` Linus Torvalds
2003-03-06 18:15                           ` Ingo Molnar
2003-03-06 18:20                             ` Linus Torvalds
2003-03-06 18:10                               ` David S. Miller
2003-03-06 18:18                           ` Ingo Molnar
2003-03-07  5:57                       ` Ingo Molnar
2003-03-07  5:54                         ` Shawn
2003-03-07  6:04                           ` Ingo Molnar
2003-03-07 14:28                         ` jlnance
2003-03-07  6:45                       ` Aaron Lehmann
2003-03-07  6:50                         ` Ingo Molnar
2003-03-07  7:00                           ` Aaron Lehmann
2003-03-07  7:36                             ` Ingo Molnar
2003-03-08 18:28                               ` Aaron Lehmann
2003-03-07  7:00                         ` Andrew Morton
2003-03-07  3:19                   ` Horst von Brand
2003-03-06 15:37           ` Linus Torvalds
2003-03-06 16:01             ` Jeff Garzik
2003-03-06 16:51               ` Linus Torvalds
2003-03-06 17:11                 ` Ingo Molnar
2003-03-06 17:52                   ` jvlists
2003-03-06 18:27                     ` Ingo Molnar
2003-03-07  8:15                       ` Xavier Bestel
2003-03-06 23:18                     ` Robert Love
2003-03-06 18:49                   ` Alan Cox
2003-03-06 17:55                     ` Linus Torvalds
2003-03-06 18:04                       ` Ingo Molnar
2003-03-06 18:13                         ` Martin J. Bligh
2003-03-06 18:26                           ` Linus Torvalds
2003-03-08  0:05                       ` Daniel Phillips
2003-03-06 17:58                     ` Ingo Molnar
2003-03-06 17:17               ` Ingo Molnar
2003-03-06 18:06                 ` Dimitrie O. Paun
2003-03-06 22:14                   ` Martin J. Bligh
2003-03-06 22:31                     ` Dimitrie O. Paun
2003-03-06 23:05                       ` Robert Love
2003-03-06 23:33                         ` Martin J. Bligh
2003-03-06 18:25               ` Alan Cox
2003-03-06 17:35                 ` Linus Torvalds
2003-03-06 22:30                   ` Eric Northup
2003-03-06 23:40                     ` Martin J. Bligh
2003-03-07  0:02                       ` Linus Torvalds
2003-03-07  0:09                         ` Dimitrie O. Paun
2003-03-06 22:00               ` Bill Davidsen
2003-03-06 17:13         ` Ingo Molnar
2003-03-06 17:30           ` Linus Torvalds
2003-03-06 17:33             ` Ingo Molnar
2003-03-06 17:50             ` Ingo Molnar [this message]
2003-03-06 18:00               ` Linus Torvalds
2003-03-06 20:42         ` Andrew Morton
2003-03-06 22:18           ` Robert Love
2003-03-07  5:52           ` Ingo Molnar
2003-03-07  5:51             ` Shawn
2003-03-07  6:01               ` Ingo Molnar
2003-03-07  6:07               ` Andrew Morton
2003-03-07  6:15           ` Ingo Molnar
2003-03-07 10:19             ` Helge Hafting
2003-03-07 11:06               ` Ingo Molnar
2003-03-07  7:45           ` Mike Galbraith
2003-03-07  7:45             ` Ingo Molnar
     [not found]             ` <Pine.LNX.4.44.0303070842420.4572-100000@localhost.localdom ain>
2003-03-07  8:09               ` Mike Galbraith
2003-03-07  8:10                 ` Andrew Morton
2003-03-07  8:26                   ` Mike Galbraith
2003-03-07  8:15                 ` Ingo Molnar
     [not found]                 ` <Pine.LNX.4.44.0303070913370.5173-100000@localhost.localdom ain>
2003-03-07  8:34                   ` Mike Galbraith
2003-03-07  8:31                     ` Ingo Molnar
2003-03-06 22:03         ` Martin Waitz
2003-03-06 22:07           ` Robert Love
2003-03-06 22:35             ` Martin Waitz
2003-03-06 22:56               ` Robert Love
2003-03-06 23:27                 ` Martin Waitz
2003-03-06 23:36                   ` Robert Love
2003-03-07 10:39                     ` Ingo Molnar
2003-03-07 10:27             ` Ingo Molnar
2003-03-06  6:58       ` [patch] "interactivity changes", sched-2.5.64-A4 Ingo Molnar
2003-03-06 10:00         ` Andrew Morton
2003-03-06 10:07           ` [patch] "interactivity changes", sched-2.5.64-A5 Ingo Molnar
2003-03-06 10:16 ` [patch] "HT scheduler", sched-2.5.63-B3 Chris Wedgwood
2003-03-06 10:18   ` Ingo Molnar
     [not found] <5.2.0.9.2.20030307093435.01a8fe88@pop.gmx.net>
2003-03-07  9:30 ` Ingo Molnar
     [not found] ` <Pine.LNX.4.44.0303071003060.6318-100000@localhost.localdom ain>
2003-03-07  9:38   ` Mike Galbraith
2003-03-10 19:53 Perez-Gonzalez, Inaky

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=Pine.LNX.4.44.0303061841480.15041-100000@localhost.localdomain \
    --to=mingo@elte.hu \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=torvalds@transmeta.com \
    /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).