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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130311082105.GB12742@gmail.com>
Date:	Mon, 11 Mar 2013 09:21:05 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Michael Wang <wangyun@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...nel.org>,
	Alex Shi <alex.shi@...el.com>, Paul Turner <pjt@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Nikunj A. Dadhania" <nikunj@...ux.vnet.ibm.com>,
	Ram Pai <linuxram@...ibm.com>
Subject: Re: [PATCH] sched: wakeup buddy


* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote:
> 
> > wake_affine() stuff is trying to bind related tasks closely, but it 
> > doesn't work well according to the test on 'perf bench sched pipe' 
> > (thanks to Peter).
> 
> so sched-pipe is a poor benchmark for this..
> 
> Ideally we'd write a new benchmark that has some actual data footprint 
> and we'd measure the cost of tasks being apart on the various cache 
> metrics and see what affine wakeup does for it.

Ideally we'd offer applications a new, lightweight vsyscall:

   void sys_sched_work_tick(void)

Or, to speed up adoption, a new, vsyscall-accelerated prctrl():

   prctl(PR_WORK_TICK);

which applications could call in each basic work unit they are performing.

Sysbench would call it for every transaction completed, sched-pipe would 
call it for every pipe message sent, hackbench would call it for messages, 
etc. etc.

This is a minimal application level change, but gives *huge* information 
to the scheduler: we could balance tasks to maximize their observed work 
rate.

The scheduler could also do other things, like observe the wakeup/sleep 
patterns within a 'work atom', observe execution overlap between work 
atoms and place tasks accordingly, etc. etc.

Today we approximate work atoms by saying that scheduling atoms == work 
atoms. But that approximation breaks down in a number of important cases.

If we had such a design we'd be able to fix pretty much everything, 
without the catch-22 problems we are facing normally.

An added bonus would be increased instrumentation: we could trace, time, 
profile work atom rates and could collect work atom profiles. We see work 
atom execution histograms, etc. etc. - stuff that is simply not possible 
today without extensive application-dependent instrumentation.

We could also use utrace scripts to define work atoms without modifying 
the application: for many applications we know which particular function 
call means that a basic work unit was completed.

I have actually written the prctl() approach before, for instrumentation 
purposes, and it does wonders to system analysis.

Any objections?

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