From: Mike Galbraith <efault@gmx.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] pending scheduler updates
Date: Wed, 22 Oct 2008 12:03:41 +0200 [thread overview]
Message-ID: <1224669821.6871.16.camel@marge.simson.net> (raw)
In-Reply-To: <20081022094019.GG12453@elte.hu>
[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]
On Wed, 2008-10-22 at 11:40 +0200, Ingo Molnar wrote:
> * Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
>
> > On Mon, Oct 20, 2008 at 02:05:38PM +0200, Ingo Molnar wrote:
> > >
> > > * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > >
> > > > Please apply
> > >
> > > applied these to tip/sched/urgent:
> > >
> > > f9c0b09: sched: revert back to per-rq vruntime
> > > a4c2f00: sched: fair scheduler should not resched rt tasks
> > > ffda12a: sched: optimize group load balancer
> > >
> > > (will wait with 4/4 until you and Mike come to a verdict.)
> >
> > Is there any conclusion on Patch 4/4? It looks sane to me!
>
> Mike?
Your call of course, but I don't think it's a good trade. In testing,
it does serious injury to mysql+oltp peak throughput, and slows down
things which need frequent preemption in order to compete effectively
against hogs. (includes desktop, though that's not heavily tested)
The attached starvation testcase, distilled from real app and posted to
lkml a few years ago, it totally kills. It's a worst case scenario to
be sure, but that worst case is pretty dramatic. I guesstimated it
would take ~12 hours for it to do 10M signals with wakeup preemption so
restricted, vs 43 seconds with preemption as is. To me, that suggests
that anything ultra fast/light will pay through the nose.
It has positive effects too, but IMHO, the bad outweigh the good.
-Mike
[-- Attachment #2: starve.c --]
[-- Type: text/x-csrc, Size: 715 bytes --]
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
volatile unsigned long loop = 10000000;
void
handler (int n)
{
if (loop > 0)
--loop;
}
static int
child (void)
{
pid_t ppid = getppid ();
sleep (1);
while (1)
kill (ppid, SIGUSR1);
return 0;
}
int
main (int argc, char **argv)
{
pid_t child_pid;
int r;
loop = argc > 1 ? strtoul (argv[1], NULL, 10) : 10000000;
printf ("expecting to receive %lu signals\n", loop);
if ((child_pid = fork ()) == 0)
exit (child ());
signal (SIGUSR1, handler);
while (loop)
sleep (1);
r = kill (child_pid, SIGTERM);
waitpid (child_pid, NULL, 0);
return 0;
}
next prev parent reply other threads:[~2008-10-22 10:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 17:27 [PATCH 0/4] pending scheduler updates Peter Zijlstra
2008-10-17 17:27 ` [PATCH 1/4] sched: optimize group load balancer Peter Zijlstra
2008-10-17 17:27 ` [PATCH 2/4] sched: fair scheduler should not resched rt tasks Peter Zijlstra
2008-10-17 17:27 ` [PATCH 3/4] sched: revert back to per-rq vruntime Peter Zijlstra
2008-10-17 17:27 ` [PATCH 4/4] sched: fix wakeup preemption Peter Zijlstra
2008-10-20 21:57 ` Chris Friesen
2008-10-20 12:05 ` [PATCH 0/4] pending scheduler updates Ingo Molnar
2008-10-21 17:35 ` Srivatsa Vaddagiri
2008-10-22 9:40 ` Ingo Molnar
2008-10-22 10:03 ` Mike Galbraith [this message]
2008-10-22 10:32 ` Mike Galbraith
2008-10-22 12:10 ` Ingo Molnar
2008-10-22 12:38 ` Mike Galbraith
2008-10-22 12:42 ` Ingo Molnar
2008-10-22 13:05 ` Mike Galbraith
2008-10-22 17:38 ` Peter Zijlstra
2008-10-22 17:56 ` Mike Galbraith
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=1224669821.6871.16.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@in.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.