mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Schwartz <davids@webmaster.com>,
	"Linux-Kernel\@Vger\. Kernel\. Org"
	<linux-kernel@vger.kernel.org>, Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Martin Michlmayr <tbm@cyrius.com>,
	Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	Stephen Hemminger <shemminger@linux-foundation.org>
Subject: Re: Network slowdown due to CFS
Date: Thu, 27 Sep 2007 14:27:46 +0200	[thread overview]
Message-ID: <20070927122746.GB2431@ff.dom.local> (raw)
In-Reply-To: <20070927094603.GA32469@elte.hu>

On Thu, Sep 27, 2007 at 11:46:03AM +0200, Ingo Molnar wrote:
> 
> * Jarek Poplawski <jarkao2@o2.pl> wrote:
> 
> > > the (small) patch below fixes the iperf locking bug and removes the 
> > > yield() use. There are numerous immediate benefits of this patch:
> > ...
> > > 
> > > sched_yield() is almost always the symptom of broken locking or other 
> > > bug. In that sense CFS does the right thing by exposing such bugs =B-)
> > 
> > ...Only if it were under some DEBUG option. [...]
> 
> note that i qualified my sentence both via "In that sense" and via a 
> smiley! So i was not suggesting that this is a general rule at all and i 
> was also joking :-)

Actually, I've analyzed this smiley for some time but these scheduler
jokes are really hard, and I definitely need more time...

> 
> > [...] Even if iperf is doing the wrong thing there is no explanation 
> > for such big difference in the behavior between sched_compat_yield 1 
> > vs. 0. It seems common interfaces should work similarly and 
> > predictably on various systems, and here, if I didn't miss something, 
> > linux looks like a different kind?
> 
> What you missed is that there is no such thing as "predictable yield 
> behavior" for anything but SCHED_FIFO/RR tasks (for which tasks CFS does 
> keep the behavior). Please read this thread on lkml for a more detailed 
> background:
> 
>    CFS: some bad numbers with Java/database threading [FIXED]
> 
>    http://lkml.org/lkml/2007/9/19/357
>    http://lkml.org/lkml/2007/9/19/328
> 
> in short: the yield implementation was tied to the O(1) scheduler, so 
> the only way to have the exact same behavior would be to have the exact 
> same core scheduler again. If what you said was true we would not be 
> able to change the scheduler, ever. For something as vaguely defined of 
> an API as yield, there's just no way to have a different core scheduler 
> and still behave the same way.
> 
> So _generally_ i'd agree with you that normally we want to be bug for 
> bug compatible, but in this specific (iperf) case there's just no point 
> in preserving behavior that papers over this _clearly_ broken user-space 
> app/thread locking (for which now two fixes exist already, plus a third 
> fix is the twiddling of that sysctl).
> 

OK, but let's forget about fixing iperf. Probably I got this wrong,
but I've thought this "bad" iperf patch was tested on a few nixes and
linux was the most different one. The main point is: even if there is
no standard here, it should be a common interest to try to not differ
too much at least. So, it's not about exactness, but 50% (63 -> 95)
change in linux own 'definition' after upgrading seems to be a lot.
So, IMHO, maybe some 'compatibility' test could be prepared to
compare a few different ideas on this yield and some average value
could be a kind of at least linux' own standard, which should be
emulated within some limits by next kernels?

Thanks,
Jarek P.

  reply	other threads:[~2007-09-27 12:25 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26  8:52 Martin Michlmayr
2007-09-26  9:34 ` Ingo Molnar
2007-09-26  9:47   ` Ingo Molnar
2007-09-26 10:08     ` Martin Michlmayr
2007-09-26 10:18       ` Ingo Molnar
2007-09-26 10:20 ` Mike Galbraith
2007-09-26 10:23 ` Mike Galbraith
2007-09-26 10:48   ` Martin Michlmayr
2007-09-26 11:21     ` Ingo Molnar
2007-09-26 11:29       ` Martin Michlmayr
2007-09-26 12:00         ` David Schwartz
2007-09-26 13:31           ` Ingo Molnar
2007-09-26 15:40             ` Stephen Hemminger
2007-09-26 15:46             ` Stephen Hemminger
2007-09-27  9:30             ` Jarek Poplawski
2007-09-27  9:46               ` Ingo Molnar
2007-09-27 12:27                 ` Jarek Poplawski [this message]
2007-09-27 13:31                   ` Ingo Molnar
2007-09-27 14:42                     ` Jarek Poplawski
2007-09-28  6:10                       ` Nick Piggin
2007-10-01  8:43                         ` Jarek Poplawski
2007-10-01 16:25                           ` Ingo Molnar
2007-10-01 16:49                             ` David Schwartz
2007-10-01 17:31                               ` Ingo Molnar
2007-10-01 18:23                                 ` David Schwartz
2007-10-02  6:06                                   ` Ingo Molnar
2007-10-02  6:47                                     ` Andi Kleen
2007-10-03  8:02                                     ` Jarek Poplawski
2007-10-03  8:16                                       ` Ingo Molnar
2007-10-03  8:56                                         ` Jarek Poplawski
2007-10-03  9:10                                           ` Ingo Molnar
2007-10-03  9:50                                             ` Jarek Poplawski
2007-10-03 10:55                                               ` Dmitry Adamushko
2007-10-03 10:58                                                 ` Dmitry Adamushko
2007-10-03 11:20                                                   ` Jarek Poplawski
2007-10-03 11:22                                                 ` Ingo Molnar
2007-10-03 11:40                                                 ` Jarek Poplawski
2007-10-03 11:56                                                   ` yield Ingo Molnar
2007-10-03 12:16                                                     ` yield Jarek Poplawski
2007-10-07  7:18                                               ` Network slowdown due to CFS Ingo Molnar
2007-10-04  5:33                                             ` Casey Dahlin
2007-10-02  6:08                                   ` Ingo Molnar
2007-10-02  6:26                                   ` Ingo Molnar
2007-10-02  6:46                                   ` yield API Ingo Molnar
2007-10-02 11:50                                     ` linux-os (Dick Johnson)
2007-10-02 15:24                                       ` Douglas McNaught
2007-10-02 21:57                                     ` Eric St-Laurent
2007-12-12 22:39                                     ` Jesper Juhl
2007-12-13  4:43                                       ` Kyle Moffett
2007-12-13 20:10                                         ` David Schwartz
2007-10-01 19:53                               ` Network slowdown due to CFS Arjan van de Ven
2007-10-01 22:17                                 ` David Schwartz
2007-10-01 22:35                                   ` Arjan van de Ven
2007-10-01 22:44                                     ` David Schwartz
2007-10-01 22:55                                       ` Arjan van de Ven
2007-10-02 15:37                                         ` David Schwartz
2007-10-03  7:15                                           ` Jarek Poplawski
2007-10-03 11:31                               ` Helge Hafting
2007-10-04  0:31                               ` Rusty Russell
2007-10-01 16:55                             ` Chris Friesen
2007-10-01 17:09                               ` Ingo Molnar
2007-10-01 17:45                                 ` Chris Friesen
2007-10-01 19:09                                   ` iperf yield usage Ingo Molnar
2007-10-02  9:03                             ` Network slowdown due to CFS Jarek Poplawski
2007-10-02 13:39                               ` Jarek Poplawski
2007-10-02  9:26                           ` Jarek Poplawski
2007-09-27  9:49         ` Ingo Molnar
2007-09-27 10:54           ` Martin Michlmayr
2007-09-27 10:56             ` Ingo Molnar
2007-09-27 11:12               ` Martin Michlmayr
2007-10-01 22:27 Hubert Tonneau

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=20070927122746.GB2431@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=a.p.zijlstra@chello.nl \
    --cc=davids@webmaster.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shemminger@linux-foundation.org \
    --cc=tbm@cyrius.com \
    --cc=vatsa@linux.vnet.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 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®