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]
Message-ID: <4965B38C.3040204@kernel.org>
Date:	Thu, 08 Jan 2009 00:04:28 -0800
From:	"H. Peter Anvin" <hpa@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Hugh Dickins <hugh@...itas.com>, Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [3/5] Mark complex bitops.h inlines as __always_inline

Ingo Molnar wrote:
> * Hugh Dickins <hugh@...itas.com> wrote:
> 
>> Hugh Dickins noticed that released gcc versions building the kernel with 
>> CONFIG_OPTIMIZE_INLINING=y don't inline some of the bitops - sometimes 
>> generating very inefficient pageflag tests, and many instances of 
>> constant_test_bit().
> 
> Could you quantify that please?
> 
> We really dont want to reintroduce __always_inline just for performance / 
> code size reasons. If GCC messes up and makes a larger / more inefficient 
> kernel, GCC will be fixed. CONFIG_OPTIMIZE_INLINING is default-off, so 
> enable it only if it improves your kernel.
> 

There is one condition under which gcc simply won't know, and that is
when an inline is composed primarily of asm code.  gcc, I believe,
creates a worst-case estimate based on the number of semicolons or
newlines (something that works semi-okayish on RISC), and thus tend to
vastly overestimate the size of an asm() on x86, where statements are
highly variable length.  Hence it is probably always going to need
hints, unless the whole handling of inline assembly is revamped (which
would be good for scheduling, but I doubt it will happen.)

	-hpa
--
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