default config includes CONFIG_OPTIMIZE_INLINING=y

Bug #327788 reported by Peter Cordes
2
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

 There are a couple recent threads on lkml where the conclusion seems to be that CONFIG_OPTIMIZE_INLINING is not ready for use yet, and probably won't be until gcc 4.4 or 4.5. And that it was a mistake for it to be on in the defconfig, which is probably why it's on in Ubuntu's kernels: in Jaunty's kernel git tree:
grep CONFIG_OPTIMIZE_INLINING debian/config/*/*
debian/config/amd64/config:CONFIG_OPTIMIZE_INLINING=y
debian/config/i386/config:CONFIG_OPTIMIZE_INLINING=y

 It's in the "kernel hacking" section, right at the very end of the menu, if you use menuconfig or xconfig, BTW.

The threads: http://lkml.org/lkml/2008/11/14/203
http://lkml.org/lkml/2009/1/4/289

CONFIG_OPTIMIZE_INLINING removes the workaround of defining inline as a macro for "inline __attribute__((always_inline))". (include/linux/compiler-gcc.h) This doesn't work well yet, because gcc will decide not to inline some functions that only generate decent code when inlined. e.g. constant_test_bit is only used if the bit number arguments is __builtin_constant_p(), so it will hopefully compile to an x86 "test" instruction, not a bunch of shifts and sometimes even an idiv. Anyway, a horrible 18 amd64 instructions long function. The other case of test_bit uses variable_test_bit, which uses inline asm (on x86) "bt; sbb".

 To see how many non-inlined copies of static inline int constant_test_bit() a kernel image has: do
grep -c constant_test_bit /boot/System.map-2.6.27-11-generic
62

Jaunty:
88 /mnt/ubuntu-testing/boot/System.map-2.6.28-6-generic
My custom-configured Jaunty kernel:
113 /boot/System.map-2.6.28-7-tesla (maybe some of the config options I turned off make more things compile-time constants)

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Peter,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/lucid.

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 327788

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.