4.1-rc1 fails with O3 optimization
Hello Newbies, I usually compile my kernel with an unsupported O3 option(why not? :). Today after running the latest 4.1-rc1 kernel with O3, I got a boot failure. This is the first time this has happened for me. If someone is interested in debugging this, please read on. Can you try to reproduce this bug? If yes, can you also bisect this? I am a bit swamped right now and can try to reproduce this only on Wednesday. If you are interested, apply the following patch, compile and see if the kernel boots. Thanks! diff --git a/Makefile b/Makefile index 14c722f..05950ca 100644 --- a/Makefile +++ b/Makefile @@ -297,8 +297,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -HOSTCXXFLAGS = -O2 +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O3 -fomit-frame-pointer -std=gnu89 +HOSTCXXFLAGS = -O3 ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1) HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \ @@ -616,7 +616,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O3 endif -- Andev
Hello, Andev wrote:
I usually compile my kernel with an unsupported O3 option(why not? :).
Because there have been publications that show on major benchmarks, the effects of -O3 are indistinguishable from noise: http://people.cs.umass.edu/~emery/pubs/Stabilizer-UMass-CS-TR2011-43.pdf Have you noticed that -O3 provides any performance benefits over -O2? yours, Bobby
On Mon, Apr 27, 2015 at 9:00 PM, Bobby Powers <bobbypowers@gmail.com> wrote:
Hello,
Andev wrote:
I usually compile my kernel with an unsupported O3 option(why not? :).
Because there have been publications that show on major benchmarks, the effects of -O3 are indistinguishable from noise: http://people.cs.umass.edu/~emery/pubs/Stabilizer-UMass-CS-TR2011-43.pdf
Have you noticed that -O3 provides any performance benefits over -O2?
Look here: http://www.spinics.net/lists/kernel/msg1962561.html Btw, this will help uncover problems in either gcc or the kernel for sure. So no harm in trying! -- Andev
I could boot it using qemu. So what's the point? On Tue, Apr 28, 2015 at 2:41 AM, Andev <debiandev@gmail.com> wrote:
On Mon, Apr 27, 2015 at 9:00 PM, Bobby Powers <bobbypowers@gmail.com> wrote:
Hello,
Andev wrote:
I usually compile my kernel with an unsupported O3 option(why not? :).
Because there have been publications that show on major benchmarks, the effects of -O3 are indistinguishable from noise: http://people.cs.umass.edu/~emery/pubs/Stabilizer-UMass-CS-TR2011-43.pdf
Have you noticed that -O3 provides any performance benefits over -O2?
Look here: http://www.spinics.net/lists/kernel/msg1962561.html
Btw, this will help uncover problems in either gcc or the kernel for sure. So no harm in trying!
-- Andev
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- ---------------------------------------------- Leônidas S. Barbosa (Kirotawa) blog: corecode.wordpress.com
On Tue, 28 Apr 2015 01:41:07 -0400, Andev said:
Look here: http://www.spinics.net/lists/kernel/msg1962561.html
I may have blinked - did you happen to mention what gcc release you are using?
On Tue, Apr 28, 2015 at 4:29 PM, <Valdis.Kletnieks@vt.edu> wrote:
On Tue, 28 Apr 2015 01:41:07 -0400, Andev said:
Look here: http://www.spinics.net/lists/kernel/msg1962561.html
I may have blinked - did you happen to mention what gcc release you are using?
$ gcc --version gcc-4.9.real (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2 I should indeed try with a 4.8 version too. -- Andev
On Tue, 28 Apr 2015 17:17:37 -0400, Andev said:
On Tue, Apr 28, 2015 at 4:29 PM, <Valdis.Kletnieks@vt.edu> wrote:
On Tue, 28 Apr 2015 01:41:07 -0400, Andev said:
Look here: http://www.spinics.net/lists/kernel/msg1962561.html
I may have blinked - did you happen to mention what gcc release you are using?
$ gcc --version gcc-4.9.real (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
I should indeed try with a 4.8 version too.
And 5.1.
participants (4)
-
Andev -
Bobby Powers -
leo kirotawa -
Valdis.Kletnieks@vt.edu