linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Evgeniy Polyakov <s0mbre@tservice.net.ru>
Cc: Mike Galbraith <efault@gmx.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>
Subject: Re: [tbench regression fixes]: digging out smelly deadmen.
Date: Sat, 11 Oct 2008 16:39:07 +0200	[thread overview]
Message-ID: <1223735947.8485.33.camel@twins> (raw)
In-Reply-To: <20081011131352.GA16908@tservice.net.ru>

On Sat, 2008-10-11 at 17:13 +0400, Evgeniy Polyakov wrote:
> Hi Mike.
> 
> On Fri, Oct 10, 2008 at 12:13:43PM +0200, Mike Galbraith (efault@gmx.de) wrote:
> > a7be37a adds some math overhead, calls to calc_delta_mine() per
> > wakeup/context switch for all weight tasks, whereas previously these
> > calls were only made for tasks which were not nice 0.  It also shifts
> > performance a bit in favor of loads which dislike wakeup preemption,
> 
> I believe anyone dislikes this :)
> 
> > this effect lessens as task count increases.  Per testing, overhead is
> > not the primary factor in throughput loss.  I believe clock accuracy to
> > be a more important factor than overhead by a very large margin.
> 
> In my tests it was not just overhead, it was a disaster.
> And stopping just before this commit gained 20 MB/s out of 30 MB/s lose
> for 26-27 window. No matter what accuracy it brings, this is just wrong
> to assume that such performance drop in some workloads is justified.
> What this accuracy is needed for?

a7be37a 's purpose is for group scheduling where it provides means to
calculate things in a unform metric.

If you take the following scenario:

    R
   /|\
  A 1 B
 /|\  |
2 3 4 5

Where letters denote supertasks/groups and digits are tasks.

We used to look at a single level only, so if you want to compute a
task's ideal runtime, you'd take:

  runtime_i = period w_i / \Sum_i w_i

So, in the above example, assuming all entries have an equal weight,
we'd want to run A for p/3. But then we'd also want to run 2 for p/3.
IOW. all of A's tasks would run in p time.

Which in contrairy to the expectation that all tasks in the scenario
would run in p.

So what the patch does is change the calculation to:

  period \Prod_l w_l,i / \Sum_i w_l,i

Which would, for 2 end up being: p 1/3 1/3 = p/9.

Now the thing that causes the extra math in the !group case is that for
the single level case, we can avoid doing that division by the sum,
because that is equal for all tasks (we then compensate for it at some
other place).

However, for the nested case, we cannot do that.

That said, we can probably still avoid the division for the top level
stuff, because the sum of the top level weights is still invariant
between all tasks.

I'll have a stab at doing so... I initially didn't do this because my
first try gave some real ugly code, but we'll see - these numbers are a
very convincing reason to try again.


  reply	other threads:[~2008-10-11 14:39 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 23:17 [tbench regression fixes]: digging out smelly deadmen Evgeniy Polyakov
2008-10-10  5:40 ` Peter Zijlstra
2008-10-10  8:09 ` Evgeniy Polyakov
2008-10-10  9:15   ` Ingo Molnar
2008-10-10 11:31     ` Evgeniy Polyakov
2008-10-10 11:40       ` Ingo Molnar
2008-10-10 13:25         ` Evgeniy Polyakov
2008-10-10 11:42       ` Ingo Molnar
2008-10-10 11:55         ` Evgeniy Polyakov
2008-10-10 11:57           ` Ingo Molnar
2008-10-24 22:25             ` Rafael J. Wysocki
2008-10-24 23:31               ` David Miller
2008-10-25  4:05                 ` Mike Galbraith
2008-10-25  5:15                   ` David Miller
2008-10-25  5:53                     ` Mike Galbraith
2008-10-25 11:13                 ` Rafael J. Wysocki
2008-10-26  3:55                   ` David Miller
2008-10-26 11:33                     ` Rafael J. Wysocki
2008-10-25  3:37               ` Mike Galbraith
2008-10-25  5:16                 ` David Miller
2008-10-25  5:58                   ` Mike Galbraith
2008-10-25  6:53                     ` Mike Galbraith
2008-10-25  7:24                       ` David Miller
2008-10-25  7:52                         ` Mike Galbraith
2008-10-25 23:10                         ` Jiri Kosina
2008-10-26  8:46                           ` Mike Galbraith
2008-10-26  9:00                             ` Peter Zijlstra
2008-10-26  9:11                               ` Andrew Morton
2008-10-26  9:27                                 ` Evgeniy Polyakov
2008-10-26  9:34                                   ` Andrew Morton
2008-10-26 10:05                                     ` Evgeniy Polyakov
2008-10-27  2:34                                       ` David Miller
2008-10-27  9:30                                         ` Ingo Molnar
2008-10-27  9:57                                           ` David Miller
2008-10-26 10:23                                 ` Mike Galbraith
2008-10-26 19:03                                 ` Jiri Kosina
2008-10-27  9:29                                   ` Mike Galbraith
2008-10-27 10:42                                   ` Jiri Kosina
2008-10-27 11:27                                     ` Ingo Molnar
2008-10-27 11:33                                       ` Alan Cox
2008-10-27 12:06                                         ` Mike Galbraith
2008-10-27 13:42                                           ` Jiri Kosina
2008-10-27 14:17                                             ` Mike Galbraith
2008-10-27 18:33                                         ` Ingo Molnar
2008-10-27 19:39                                           ` Evgeniy Polyakov
2008-10-27 19:48                                             ` David Miller
2008-10-28 10:24                                               ` Mike Galbraith
2008-10-28 10:37                                                 ` Ingo Molnar
2008-10-28 10:57                                                   ` Mike Galbraith
2008-10-28 11:02                                                     ` Ingo Molnar
2008-10-28 14:00                                                     ` Mike Galbraith
2008-10-28 15:22                                                       ` Mike Galbraith
2008-10-29  9:14                                                   ` Evgeniy Polyakov
2008-10-29  9:50                                                     ` Evgeniy Polyakov
2008-11-01 12:51                                                       ` Paolo Ciarrocchi
2008-10-29  9:59                                           ` Nick Piggin
2008-10-26  9:15                               ` Mike Galbraith
2008-10-25  7:19                     ` David Miller
2008-10-25  7:33                       ` Mike Galbraith
2008-10-27 17:26                         ` Rick Jones
2008-10-27 19:11                           ` Mike Galbraith
2008-10-27 19:18                             ` Rick Jones
2008-10-27 19:44                               ` Mike Galbraith
2008-10-26 11:29               ` Evgeniy Polyakov
2008-10-26 12:23                 ` Evgeniy Polyakov
2008-10-30 18:15                   ` Stephen Hemminger
2008-10-30 18:40                     ` Evgeniy Polyakov
2008-10-30 18:43                     ` Eric Dumazet
2008-10-30 18:56                       ` Eric Dumazet
2008-10-30 19:01                     ` Ilpo Järvinen
2008-10-31  7:52                       ` David Miller
2008-10-31  9:40                         ` Ilpo Järvinen
2008-10-31  9:51                           ` David Miller
2008-10-31 10:42                             ` Ilpo Järvinen
2008-10-31 10:45                             ` Eric Dumazet
2008-10-31 11:01                               ` Ilpo Järvinen
2008-10-31 11:10                                 ` Eric Dumazet
2008-10-31 11:15                                   ` Ilpo Järvinen
2008-10-31 19:57                               ` Stephen Hemminger
2008-10-31 20:10                                 ` Evgeniy Polyakov
2008-10-31 21:03                                   ` Eric Dumazet
2008-10-31 21:18                                     ` Evgeniy Polyakov
2008-10-31 23:51                                     ` David Miller
2008-10-31 23:56                                       ` Stephen Hemminger
2008-11-01  0:16                                         ` Jay Vosburgh
2008-11-02  4:40                                           ` David Miller
2008-11-04  2:13                                             ` [PATCH net-next-2.6] bonding, net: Move last_rx update into bonding recv logic Jay Vosburgh
2008-11-04  2:17                                               ` David Miller
2008-10-10 10:13 ` [tbench regression fixes]: digging out smelly deadmen Mike Galbraith
2008-10-11 13:13   ` Evgeniy Polyakov
2008-10-11 14:39     ` Peter Zijlstra [this message]
2008-10-11 18:13       ` Mike Galbraith
2008-10-12  6:02         ` Mike Galbraith
2008-10-12  6:33           ` 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=1223735947.8485.33.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=davem@davemloft.net \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=s0mbre@tservice.net.ru \
    /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).