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: <20090701090749.GA13535@elte.hu>
Date:	Wed, 1 Jul 2009 11:07:49 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc:	andi@...stfloor.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RFC] Adding information of counts processes acquired
	how many spinlocks to schedstat


* Hitoshi Mitake <mitake@....info.waseda.ac.jp> wrote:

> From: Andi Kleen <andi@...stfloor.org>
> Subject: Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat
> Date: Wed, 01 Jul 2009 09:38:04 +0200
> 
> > Hitoshi Mitake <mitake@....info.waseda.ac.jp> writes:
> > 
> > > Hi,
> > >
> > > I wrote a test patch which add information of counts processes acquired how many spinlocks to schedstat.
> > > After applied this patch, /proc/<PID>/sched will change like this,
> > 
> > The problem is that spinlocks are very common and schedstats is 
> > enabled commonly in production kernels. You would need to 
> > demonstrate that such a change doesn't have significant 
> > performance impact. For me it looks like it has.
> 
> I agree with your opinion about performance impact.
> I thought this will make no problem,
> because schedstat is categorized as "Kernel hacking" section.
> But according to you, many production kernels enable it
> so my patch will make widespread performance degradation.
> I didn't know that, sorry.

His arguments are bogus: both lockstat and perfcounters are optional 
(and default off), and the sw counter can be made near zero cost 
even if both perfcounters and lockstat is enabled. Also, sw counters 
are generally per CPU, etc. so not a performance issue.

The only (small) overhead will be when the lock-acquire sw counter 
is actively enabled because you run 'perf stat -e lock-acquire' - 
but that is expected and inherent in pretty much any kind of 
instrumentation.

The feature you are working on has the chance to be a very useful 
and popular piece of instrumentation. Being able to tell the lock 
acquire stats on a per task, per workload, per CPU or system-wide 
basis is a unique capability no other tool can offer right now.

Andi is often trolling perfcounters related (and other) threads, 
please dont let yourself be deterred by that and feel free to ignore 
him.

	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