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]
Date:	Tue, 12 Mar 2013 09:48:57 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Michael Wang <wangyun@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	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


* Michael Wang <wangyun@...ux.vnet.ibm.com> wrote:

> On 03/11/2013 05:40 PM, Ingo Molnar wrote:
> > 
> > * Michael Wang <wangyun@...ux.vnet.ibm.com> wrote:
> > 
> >> Hi, Ingo
> >>
> >> On 03/11/2013 04:21 PM, Ingo Molnar wrote:
> >> [snip]
> >>>
> >>> I have actually written the prctl() approach before, for instrumentation 
> >>> purposes, and it does wonders to system analysis.
> >>
> >> The idea sounds great, we could get many new info to implement more
> >> smart scheduler, that's amazing :)
> >>
> >>>
> >>> Any objections?
> >>
> >> Just one concern, may be I have misunderstand you, but will it cause 
> >> trouble if the prctl() was indiscriminately used by some applications, 
> >> will we get fake data?
> > 
> > It's their problem: overusing it will increase their CPU overhead. The two 
> > boundary worst-cases are that they either call it too frequently or too 
> > rarely:
> > 
> >  - too frequently: it approximates the current cpu-runtime work metric
> > 
> >  - too infrequently: we just ignore it and fall back to a runtime metric
> >    if it does not change.
> > 
> > It's not like it can be used to get preferential treatment - we don't ever 
> > balance other tasks against these tasks based on work throughput, we try 
> > to maximize this workload's work throughput.
> > 
> > What could happen is if an app is 'optimized' for a buggy scheduler by 
> > changing the work metric frequency. We offer no guarantee - apps will be 
> > best off (and users will be least annoyed) if apps honestly report their 
> > work metric.
> > 
> > Instrumentation/stats/profiling will also double check the correctness of 
> > this data: if developers/users start relying on the work metric as a 
> > substitute benchmark number, then app writers will have an additional 
> > incentive to make them correct.
> 
> I see, I could not figure out how to wisely using the info currently, 
> but I have the feeling that it will make scheduler very different ;-)
> 
> May be we could implement the API and get those info ready firstly 
> (along with the new sched-pipe which provide work tick info), then think 
> about the way to use them in scheduler, is there any patches on the way?

Absolutely.

Beyond the new prctl no new API is needed: a perf soft event could be 
added, and/or a tracepoint. Then perf stat and perf record could be used 
with it. 'perf bench' could be extended to generate the work tick in its 
'perf bench sched ...' workloads - and for 'perf bench mem numa' as well.

vsyscall-accelerating it could be a separate, more complex step: it needs 
a per thread writable vsyscall data area to make the overhead to 
applications near zero. Performance critical apps won't call an extra 
syscall.

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