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: <7479958c-1932-4ced-a7a4-53ac6ea3a38e@email.android.com>
Date:	Wed, 22 Feb 2012 00:01:03 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>
CC:	Jason Baron <jbaron@...hat.com>, a.p.zijlstra@...llo.nl,
	mathieu.desnoyers@...icios.com, davem@...emloft.net,
	ddaney.cavm@...il.com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs

Stupid thought... do we have cases that matter where the bias and default don't agree?

Ingo Molnar <mingo@...e.hu> wrote:

>
>* Ingo Molnar <mingo@...e.hu> wrote:
>
>> But it is fundamentally mixing execution and *data type* and 
>> it is not conveying the build time bias properly.
>> 
>> So the best high level naming would be something like:
>> 
>> 	struct static_condition static_flag = STATIC_COND_FALSE;
>> 
>> 
>> 	if (very_unlikely(&static_flag)) {
>> 		...
>> 	}
>> 
>> 	...
>> 
>> 	static_cond_inc(&static_flag);
>> 	...
>> 	static_cond_dec(&static_flag);
>
>Btw., I think the modification path could also carry the high 
>cost of modification (stopping all cpus, modifying code, etc.).
>
>This could be done via:
>
>	static_cond_slow_inc(&static_flag);
>	...
>	static_cond_slow_dec(&static_flag);
>
>And if a developer does not notice that 'slow' implies a 
>performance cost, then he probably would have doubly missed this 
>aspect of jump_label_inc()/jump_label_dec().
>
>Thanks,
>
>	Ingo

-- 
Sent from my mobile phone. Please excuse my brevity and lack of formatting.
--
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