public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: george anzinger <george@mvista.com>
Cc: Mike Kravetz <kravetz@us.ibm.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Context switch times
Date: Sun, 7 Oct 2001 22:24:40 +0200	[thread overview]
Message-ID: <20011007222440.G726@athlon.random> (raw)
In-Reply-To: <E15pFor-0004sC-00@fenrus.demon.nl> <200110042139.f94Ld5r09675@vindaloo.ras.ucalgary.ca> <20011004.145239.62666846.davem@redhat.com> <20011004175526.C18528@redhat.com> <9piokt$8v9$1@penguin.transmeta.com> <20011004164102.E1245@w-mikek2.des.beaverton.ibm.com> <20011005024526.E724@athlon.random> <20011004213507.B1032@w-mikek2.sequent.com> <20011007195928.D726@athlon.random> <3BC0B2E0.C6421F8F@mvista.com>
In-Reply-To: <3BC0B2E0.C6421F8F@mvista.com>; from george@mvista.com on Sun, Oct 07, 2001 at 12:54:08PM -0700

On Sun, Oct 07, 2001 at 12:54:08PM -0700, george anzinger wrote:
> Andrea Arcangeli wrote:
> > 
> > On Thu, Oct 04, 2001 at 09:35:07PM -0700, Mike Kravetz wrote:
> > > [..] the pipe routines only call
> > > the non-synchronous form of wake_up. [..]
> > 
> > Ok I see, I overlooked that when we don't need to block we wakeup-async.
> > 
> > So first of all it would be interesting to change the token passed
> > thorugh the pipe so that it always fills in the PAGE_SIZE pipe buffer so
> > that the task goes to sleep before reading from the next pipe in the
> > ring.
> > 
> > And if we want to optimize the current benchmark (with the small token that
> > triggers the async-wakeup and it always goes to sleep in read() rather
> > than write()) we'd need to invalidate a basic point of the scheduler
> > that have nothing to do with IPI reschedule, the point to invalidate is
> > that if the current task (the one that is running wake_up()) has a small
> > avg_slice we'd better not reschedule the wakenup task on a new idle cpu
> > but we'd better wait the current task to go away instead. 
> 
> A couple of questions: 
> 
> 1.) Do you want to qualify that the wake_up is not from an interrupt?

If the avg_slice is very small we know the task will probabilistically
go away soon regardless where the wakeup cames from. I don't think the
logic has connection to the kind of wakeup, it only has connection to
the kind of "running task".

Infact waiting "bash" or "ksoftirqd" to go away is the right thing to do
to fix the suprious migrations of cpu intensive tasks too, no matter
where the wakeup cames from.

The only risk here is that we never know from the scheduler if the
running task with the small avg_slice will really go away this time too
or not. And if it doesn't go away this time, we may not do the best
global decision by not migrating the wakenup task to the idle cpus, but
the probability information provided by avg_slice should cover this
problem.

Of course this is theory, I didn't attempted to test it.

btw, I remeber Ingo some year ago said on l-k that rescheduling
immediatly every idle cpu isn't the best thing to do.

> 2.) Having done this AND the task doesn't block THIS time, do we wait
> for the slice to end or is some other "dead man" timer needed?

Of course waiting for the slice to end anyways is the natural first
step. As said above the point of the probability information of
avg_slice is to render very unlikely the "task doesn't block THIS time"
case.

Andrea

  reply	other threads:[~2001-10-07 20:25 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-04 21:04 Context switch times Mike Kravetz
2001-10-04 21:14 ` arjan
2001-10-04 21:25   ` David S. Miller
2001-10-04 21:39     ` Richard Gooch
2001-10-04 21:52       ` David S. Miller
2001-10-04 21:55         ` Benjamin LaHaise
2001-10-04 22:35           ` Davide Libenzi
2001-10-04 22:49             ` Mike Kravetz
2001-10-04 22:42           ` Linus Torvalds
2001-10-04 22:53             ` Benjamin LaHaise
2001-10-05 15:13               ` Alan Cox
2001-10-05 17:49                 ` george anzinger
2001-10-05 22:29                   ` Alan Cox
2001-10-05 22:56                     ` Davide Libenzi
2001-10-05 23:04                       ` Alan Cox
2001-10-05 23:16                         ` Davide Libenzi
2001-10-05 23:17                           ` Alan Cox
2001-10-05 23:21                             ` Davide Libenzi
2001-10-05 23:43                         ` Roger Larsson
2001-10-07  1:20                     ` george anzinger
2001-10-07  1:33                       ` Bill Davidsen
2001-10-07  9:56                       ` Alan Cox
2001-10-06  2:24                 ` Albert D. Cahalan
2001-10-06  2:57                   ` Davide Libenzi
2001-10-07  9:57                 ` Mika Liljeberg
2001-10-07 13:03                   ` Ingo Oeser
2001-10-07 13:48                     ` Mika Liljeberg
2001-10-07 14:24                       ` Ingo Oeser
2001-10-07 14:33                         ` Mika Liljeberg
2001-10-07 18:00                           ` george anzinger
2001-10-07 22:06                             ` Mika Liljeberg
2001-10-07 22:31                               ` Davide Libenzi
2001-10-07 22:33                                 ` Mika Liljeberg
2001-10-07 23:49                               ` george anzinger
2001-10-08 21:07                                 ` Mika Liljeberg
2001-10-08 22:54                                   ` discontig physical memory Petko Manolov
2001-10-08 23:05                                     ` David S. Miller
2001-10-08 23:18                                       ` Petko Manolov
2001-10-08 23:29                                         ` David S. Miller
2001-10-09  0:34                                           ` Petko Manolov
2001-10-09  0:36                                           ` Petko Manolov
2001-10-09  1:37                                             ` David S. Miller
2001-10-09  2:43                                               ` Petko Manolov
2001-10-08 15:19                           ` Context switch times bill davidsen
2001-10-10  6:07                             ` Mike Fedyk
2001-10-07 18:39                   ` Davide Libenzi
2001-10-09 20:37                   ` Hubertus Franke
2001-10-09 23:50                     ` george anzinger
2001-10-11 10:52                       ` Hubertus Franke
2001-10-04 23:41             ` Mike Kravetz
2001-10-04 23:50               ` Linus Torvalds
2001-10-05 15:15                 ` Eric W. Biederman
2001-10-04 23:56               ` Davide Libenzi
2001-10-05  0:45               ` Andrea Arcangeli
2001-10-05  4:35                 ` Mike Kravetz
2001-10-07 17:59                   ` Andrea Arcangeli
2001-10-07 19:54                     ` george anzinger
2001-10-07 20:24                       ` Andrea Arcangeli [this message]
2001-10-09  4:55         ` Richard Gooch
2001-10-09  5:00           ` David S. Miller
2001-10-09 13:49           ` bill davidsen
  -- strict thread matches above, loose matches on Subject: below --
2001-10-05  6:31 Michailidis, Dimitrios

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=20011007222440.G726@athlon.random \
    --to=andrea@suse.de \
    --cc=george@mvista.com \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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