From: Ingo Molnar <mingo@kernel.org>
To: Josef Bacik <jbacik@fb.com>
Cc: riel@redhat.com, mingo@redhat.com, peterz@infradead.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com,
Arnaldo Carvalho de Melo <acme@infradead.org>
Subject: Re: [PATCH] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE
Date: Thu, 28 May 2015 13:53:39 +0200 [thread overview]
Message-ID: <20150528115339.GB29228@gmail.com> (raw)
In-Reply-To: <55662460.2050501@fb.com>
* Josef Bacik <jbacik@fb.com> wrote:
> On 05/26/2015 05:31 PM, Josef Bacik wrote:
> >At Facebook we have a pretty heavily multi-threaded application that is
> >sensitive to latency. We have been pulling forward the old SD_WAKE_IDLE code
> >because it gives us a pretty significant performance gain (like 20%). It turns
> >out this is because there are cases where the scheduler puts our task on a busy
> >CPU when there are idle CPU's in the system. We verify this by reading the
> >cpu_delay_req_avg_us from the scheduler netlink stuff. With our crappy patch we
> >get much lower numbers vs baseline.
> >
> >SD_BALANCE_WAKE is supposed to find us an idle cpu to run on, however it is just
> >looking for an idle sibling, preferring affinity over all else. This is not
> >helpful in all cases, and SD_BALANCE_WAKE's job is to find us an idle cpu, not
> >garuntee affinity. Fix this by first trying to find an idle sibling, and then
> >if the cpu is not idle fall through to the logic to find an idle cpu. With this
> >patch we get slightly better performance than with our forward port of
> >SD_WAKE_IDLE. Thanks,
> >
>
> I rigged up a test script to run the perf bench sched tests and give me the
> numbers. Here are the numbers
>
> 4.0
>
> Messaging: 56.934 Total runtime in seconds
> Pipe: 105620.762 ops/sec
>
> 4.0 + my patch
>
> Messaging: 47.374
> Pipe: 113691.199
Btw., with perf bench you don't really need much extra scripting, something like
this should give you pretty good numbers plus an stddev estimate:
perf stat --null --repeat 10 perf bench sched messaging -l 10000
on my box this gives:
4.391469643 seconds time elapsed ( +- 2.81% )
you can adjust the -l value to move the runtime up/down to a value that you think
runs long enough to give stable results.
Thanks,
Ingo
prev parent reply other threads:[~2015-05-28 11:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1432675865-378571-1-git-send-email-jbacik@fb.com>
2015-05-27 20:09 ` [PATCH] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE Josef Bacik
2015-05-27 21:03 ` Rik van Riel
2015-05-27 21:23 ` Josef Bacik
2015-05-28 11:53 ` Ingo Molnar [this message]
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=20150528115339.GB29228@gmail.com \
--to=mingo@kernel.org \
--cc=acme@infradead.org \
--cc=jbacik@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.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.