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:	Thu, 05 Sep 2013 13:33:22 -0400
From:	Waiman Long <waiman.long@...com>
To:	Ingo Molnar <mingo@...nel.org>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Jeff Layton <jlayton@...hat.com>,
	Miklos Szeredi <mszeredi@...e.cz>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Andi Kleen <andi@...stfloor.org>,
	"Chandramouleeswaran, Aswin" <aswin@...com>,
	"Norton, Scott J" <scott.norton@...com>
Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless
 update of refcount

On 09/05/2013 09:31 AM, Ingo Molnar wrote:
> * Waiman Long<waiman.long@...com>  wrote:
>
>
>> The latest tty patches did work. The tty related spinlock contention
>> is now completely gone. The short workload can now reach over 8M JPM
>> which is the highest I have ever seen.
>>
>> The perf profile was:
>>
>> 5.85%     reaim  reaim                 [.] mul_short
>> 4.87%     reaim  [kernel.kallsyms]     [k] ebitmap_get_bit
>> 4.72%     reaim  reaim                 [.] mul_int
>> 4.71%     reaim  reaim                 [.] mul_long
>> 2.67%     reaim  libc-2.12.so          [.] __random_r
>> 2.64%     reaim  [kernel.kallsyms]     [k] lockref_get_not_zero
>> 1.58%     reaim  [kernel.kallsyms]     [k] copy_user_generic_string
>> 1.48%     reaim  [kernel.kallsyms]     [k] mls_level_isvalid
>> 1.35%     reaim  [kernel.kallsyms]     [k] find_next_bit
> 6%+ spent in ebitmap_get_bit() and mls_level_isvalid() looks like
> something worth optimizing.
>
> Is that called very often, or is it perhaps cache-bouncing for some
> reason?

The high cycle count is due more to inefficient algorithm in the 
mls_level_isvalid() function than cacheline contention in the code. The 
attached patch should address this problem. It is in linux-next and 
hopefully will be merged in 3.12.

-Longman

View attachment "0001-SELinux-Reduce-overhead-of-mls_level_isvalid-functio.patch" of type "text/plain" (7858 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ