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: <20090701135034.GU6760@one.firstfloor.org>
Date:	Wed, 1 Jul 2009 15:50:34 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>, andi@...stfloor.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat II

On Wed, Jul 01, 2009 at 11:07:49AM +0200, Ingo Molnar wrote:
> 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.

BTW I looked through the code generated by this again.  As far as I 
can see it still uses a global flag word to enable/disable the counter.

The standard problem -- discussed a lot -- with that set up used to be that 
if the kernel is entered cache cold then you end up with a potential full cache
miss (200-1000 cycles) just to access that global variable. The old LTT
had a neat optimization to patch in immediate values to avoid this problem.

Has this been considered for these counters? With such a change
it might be indeed a "small" cost even in the worst cases.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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