lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 28 May 2015 13:53:39 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Josef Bacik <jbacik@...com>
Cc:	riel@...hat.com, mingo@...hat.com, peterz@...radead.org,
	linux-kernel@...r.kernel.org, kernel-team@...com,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH] sched: prefer an idle cpu vs an idle sibling for
 BALANCE_WAKE


* Josef Bacik <jbacik@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ