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] [day] [month] [year] [list]
Date:	Wed, 27 Oct 2010 19:00:23 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Avi Kivity <avi@...hat.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: fyi: gcc33-hammer crashes when compiling kvm emulate.c

> Would be good to have __fastpath and __slowpath function attributes.
> 
> __fastpath would always be optimized for speed, __slowpath always
> for size, and everything else would use the default (determined by
> CONFIG_CC_OPTIMIZE_FOR_SIZE).

> 
> Looks like gcc has support for this, with __attribute__((hot)),
> __attribute__((cold)), and __attribute__((optimize)).

I had patches for a long time, but last time I tried it didn't help too much.
(basically make __init hot/cold and mark a few functions) 
Similar things can be also done with unrolling. The Optimize attribute
is currently quite broken in gcc and shouldn't be used.

The main reason I didn't post them is that I didn't want another
likely/unlikely with people sprinkling them randomly and never
looking at profile logs. I am to blame for likely()/unlikely() originally
 and it got abused so much that I regretted it alot. So I don't
think just exposing that is a good idea right now.

I think there are some other ways to do that better, but they
will need more work.

-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