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: <20080427082010.GA13848@elte.hu>
Date:	Sun, 27 Apr 2008 10:20:10 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	David Miller <davem@...emloft.net>
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, viro@...IV.linux.org.uk
Subject: Re: CONFIG_OPTIMIZE_INLINING


* David Miller <davem@...emloft.net> wrote:

> From: Ingo Molnar <mingo@...e.hu>
> Date: Sun, 27 Apr 2008 07:59:43 +0200
> 
> > ... as i saw no reason why this feature, which i found rather 
> > useful, should be delayed another year or so. I'd be more than happy 
> > to promote this feature back to lib/Kconfig.debug, sparc64 interest 
> > would make that a strong argument.
> 
> So you caved in to FUD in order to pad your commit and signoff count?

David, stop this nonsense already.

Had you read the lkml discussion thread i linked to:

  http://lkml.org/lkml/2008/3/3/122

... you'd realize that the first thing i did was to make it a generic 
feature. But it was claimed on lkml that this would break an unknown 
number of architectures:

| > > And what we should do is to attack the excessive wrong usage of 
| > > inlines in .c files, not messing with a global #define in a way 
| > > that the results on 24 architectures with 7 different releases of 
| > > gcc would be unpredictable.

Where were you in that thread defending my position? Andrew showed 
interest, gave me feedback and i incorporated that feedback.

I am fully willing and ready to move this feature to a generic file (via 
the patch below), in fact i implemented it that way from the get go, but 
only:

   _if other architecture maintainers want it too_

Nobody countered the "it would break other architectures" position in 
that discussion, and i'm not interested in endless bikeshed painting 
either.

lets look at a counter-example where other architecture maintainers 
showed interest: the recent bitops generalizations we did for x86 and 
extended to all other architectures. It was welcome by other maintainers 
and we did it that way. See the merge commit 9b79ed952bd734 for an 
overview of this topic:

    x86, bitops: select the generic bitmap search functions
    x86: include/asm-x86/pgalloc.h/bitops.h: checkpatch cleanups - formatting
    x86: finalize bitops unification
    x86, UML: remove x86-specific implementations of find_first_bit
    x86: optimize find_first_bit for small bitmaps
    x86: switch 64-bit to generic find_first_bit
    x86: generic versions of find_first_(zero_)bit, convert i386
    bitops: use __fls for fls64 on 64-bit archs
    generic: implement __fls on all 64-bit archs
    generic: introduce a generic __fls implementation
    x86: merge the simple bitops and move them to bitops.h
    x86, generic: optimize find_next_(zero_)bit for small constant-size bitmap
    x86, uml: fix uml with generic find_next_bit for x86
    x86: change x86 to use generic find_next_bit
    uml: Kconfig cleanup
    uml: fix build error

	Ingo

-------------------------------->
Subject: generic: optimize inlining
From: Ingo Molnar <mingo@...e.hu>
Date: Sun Apr 27 09:36:29 CEST 2008

Suggested-by: David Miller <davem@...emloft.net>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/Kconfig.debug |   12 ------------
 init/Kconfig           |   13 +++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)

Index: linux/arch/x86/Kconfig.debug
===================================================================
--- linux.orig/arch/x86/Kconfig.debug
+++ linux/arch/x86/Kconfig.debug
@@ -355,15 +355,3 @@ config CPA_DEBUG
 
 endmenu
 
-config OPTIMIZE_INLINING
-	bool "Allow gcc to uninline functions marked 'inline'"
-	default y
-	help
-	  This option determines if the kernel forces gcc to inline the functions
-	  developers have marked 'inline'. Doing so takes away freedom from gcc to
-	  do what it thinks is best, which is desirable for the gcc 3.x series of
-	  compilers. The gcc 4.x series have a rewritten inlining algorithm and
-	  disabling this option will generate a smaller kernel there. Hopefully
-	  this algorithm is so good that allowing gcc4 to make the decision can
-	  become the default in the future, until then this option is there to
-	  test gcc for this.
Index: linux/init/Kconfig
===================================================================
--- linux.orig/init/Kconfig
+++ linux/init/Kconfig
@@ -520,6 +520,19 @@ config CC_OPTIMIZE_FOR_SIZE
 
 	  If unsure, say N.
 
+config OPTIMIZE_INLINING
+	bool "Allow gcc to uninline functions marked 'inline'"
+	default y
+	help
+	  This option determines if the kernel forces gcc to inline the functions
+	  developers have marked 'inline'. Doing so takes away freedom from gcc to
+	  do what it thinks is best, which is desirable for the gcc 3.x series of
+	  compilers. The gcc 4.x series have a rewritten inlining algorithm and
+	  disabling this option will generate a smaller kernel there. Hopefully
+	  this algorithm is so good that allowing gcc4 to make the decision can
+	  become the default in the future, until then this option is there to
+	  test gcc for this.
+
 config SYSCTL
 	bool
 
--
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