All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Michael Wang <wangyun@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Paul Turner <pjt@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	alex.shi@intel.com, Ram Pai <linuxram@us.ibm.com>,
	"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com>,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair()
Date: Fri, 22 Feb 2013 10:40:22 +0100	[thread overview]
Message-ID: <1361526022.5817.115.camel@marge.simpson.net> (raw)
In-Reply-To: <1361522197.26780.39.camel@laptop>

On Fri, 2013-02-22 at 09:36 +0100, Peter Zijlstra wrote: 
> On Fri, 2013-02-22 at 10:37 +0800, Michael Wang wrote:
> > But that's really some benefit hardly to be estimate, especially when
> > the workload is heavy, the cost of wake_affine() is very high to
> > calculated se one by one, is that worth for some benefit we could not
> > promise?
> 
> Look at something like pipe-test.. wake_affine() used to ensure both
> client/server ran on the same cpu, but then I think we added
> select_idle_sibling() and wrecked it again :/

Yeah, that's the absolute worst case for select_idle_sibling(), 100%
synchronous, absolutely nothing to be gained by cross cpu scheduling.
Fortunately, most tasks do more than that, but nonetheless,
select_idle_sibling() definitely is a two faced little b*tch.  I'd like
to see the evil b*tch die, but something needs to replace it's pretty
face.  One thing that you can do is simply don't call it when the
context switch rate is incredible.. its job is to recover overlap, if
you're scheduling near your max, there's no win worth the cost.

> $ taskset 1 perf bench sched pipe
> # Running sched/pipe benchmark...
> # Extecuted 1000000 pipe operations between two tasks
> 
>      Total time: 3.761 [sec]
> 
>        3.761725 usecs/op
>          265835 ops/sec
> 
> $ perf bench sched pipe
> # Running sched/pipe benchmark...
> # Extecuted 1000000 pipe operations between two tasks
> 
>      Total time: 29.809 [sec]
> 
>       29.809720 usecs/op
>           33546 ops/sec

Gak!  Hm, are you running a kernel without the thinko fix?  It's not
good for this extreme testcase, but it doesn't suck _that_ bad ;-)

nohz isn't exactly your friend with ultra switchers either.

Q6600:
marge:~ # taskset -c 3 perf bench sched pipe
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two tasks

     Total time: 3.395 [sec]

       3.395357 usecs/op
         294519 ops/sec
marge:~ # perf bench sched pipe
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two tasks

     Total time: 4.212 [sec]

       4.212413 usecs/op
         237393 ops/sec

E5620:
rtbox:~ # taskset -c 0 perf bench sched pipe
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two tasks

     Total time: 2.558 [sec]

       2.558237 usecs/op
         390894 ops/sec
rtbox:~ # perf bench sched pipe
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two tasks

     Total time: 4.588 [sec]

       4.588702 usecs/op
         217926 ops/sec


  parent reply	other threads:[~2013-02-22  9:45 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  9:08 [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair() Michael Wang
2013-01-29  9:09 ` [RFC PATCH v3 1/3] sched: schedule balance map foundation Michael Wang
2013-02-20 13:21   ` Peter Zijlstra
2013-02-21  4:52     ` Michael Wang
2013-02-20 13:25   ` Peter Zijlstra
2013-02-21  4:58     ` Michael Wang
2013-02-21 11:37       ` Peter Zijlstra
2013-02-22  2:53         ` Michael Wang
2013-02-22  3:33           ` Alex Shi
2013-02-22  4:19             ` Michael Wang
2013-02-22  4:46               ` Alex Shi
2013-02-22  5:05                 ` Michael Wang
2013-01-29  9:09 ` [RFC PATCH v3 2/3] sched: build schedule balance map Michael Wang
2013-01-29  9:10 ` [RFC PATCH v3 3/3] sched: simplify select_task_rq_fair() with " Michael Wang
2013-02-18  5:52 ` [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair() Michael Wang
2013-02-20 10:49 ` Ingo Molnar
2013-02-20 13:32   ` Peter Zijlstra
2013-02-20 14:05     ` Mike Galbraith
2013-02-21  5:21       ` Michael Wang
2013-02-21  5:14     ` Michael Wang
2013-02-21  4:51   ` Michael Wang
2013-02-21  6:11     ` Mike Galbraith
2013-02-21  7:00       ` Michael Wang
2013-02-21  8:10         ` Mike Galbraith
2013-02-21  9:08           ` Michael Wang
2013-02-21  9:43             ` Mike Galbraith
2013-02-22  2:36               ` Michael Wang
2013-02-22  5:02                 ` Mike Galbraith
2013-02-22  5:26                   ` Michael Wang
2013-02-22  6:13                     ` Mike Galbraith
2013-02-22  6:42                   ` Michael Wang
2013-02-22  8:17                     ` Mike Galbraith
2013-02-22  8:35                       ` Michael Wang
2013-02-22  8:21                 ` Peter Zijlstra
2013-02-22  9:10                   ` Michael Wang
2013-02-22  9:39                     ` Peter Zijlstra
2013-02-22  9:58                       ` Michael Wang
2013-02-21  9:20           ` Michael Wang
2013-02-21 10:20     ` Peter Zijlstra
2013-02-22  2:37       ` Michael Wang
2013-02-22  5:08         ` Mike Galbraith
2013-02-22  6:06           ` Michael Wang
2013-02-22  6:19             ` Mike Galbraith
2013-02-22  8:36         ` Peter Zijlstra
2013-02-22  9:11           ` Michael Wang
2013-02-22  9:57             ` Peter Zijlstra
2013-02-22 10:08               ` Michael Wang
2013-02-22  9:40           ` Mike Galbraith [this message]
2013-02-22  9:54             ` Ingo Molnar
2013-02-22 10:01               ` Mike Galbraith
2013-02-22 12:11                 ` Ingo Molnar
2013-02-22 12:35                   ` Mike Galbraith
2013-02-22 13:06                     ` Ingo Molnar
2013-02-22 14:30                       ` Mike Galbraith
2013-02-22 14:42                         ` 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=1361526022.5817.115.camel@marge.simpson.net \
    --to=efault@gmx.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=pjt@google.com \
    --cc=wangyun@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 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.