All of lore.kernel.org
 help / color / mirror / Atom feed
* 4.1-rc1 fails with O3 optimization
@ 2015-04-27  2:03 Andev
  2015-04-28  1:00 ` Bobby Powers
  0 siblings, 1 reply; 13+ messages in thread
From: Andev @ 2015-04-27  2:03 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-27  2:03 4.1-rc1 fails with O3 optimization Andev
@ 2015-04-28  1:00 ` Bobby Powers
  2015-04-28  5:41   ` Andev
  0 siblings, 1 reply; 13+ messages in thread
From: Bobby Powers @ 2015-04-28  1:00 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28  1:00 ` Bobby Powers
@ 2015-04-28  5:41   ` Andev
  2015-04-28 13:03     ` leo kirotawa
  2015-04-28 20:29     ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 13+ messages in thread
From: Andev @ 2015-04-28  5:41 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28  5:41   ` Andev
@ 2015-04-28 13:03     ` leo kirotawa
       [not found]       ` <CAJUuVQ4i0UxQbCubaLbpUFzsnOcW_XrOf7MCA_qXoyX7qMzFPQ@mail.gmail.com>
  2015-04-28 20:29     ` Valdis.Kletnieks at vt.edu
  1 sibling, 1 reply; 13+ messages in thread
From: leo kirotawa @ 2015-04-28 13:03 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 

----------------------------------------------
Le?nidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150428/9bf6755f/attachment.html 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
       [not found]       ` <CAJUuVQ4i0UxQbCubaLbpUFzsnOcW_XrOf7MCA_qXoyX7qMzFPQ@mail.gmail.com>
@ 2015-04-28 16:46         ` leo kirotawa
  2015-04-28 17:40           ` leo kirotawa
  0 siblings, 1 reply; 13+ messages in thread
From: leo kirotawa @ 2015-04-28 16:46 UTC (permalink / raw)
  To: kernelnewbies

that .config you sent is for 4.0-rc2, is that right?


here is the diff after a make oldconfig [1]

[1] http://pastebin.com/4Lfs2it0

On Tue, Apr 28, 2015 at 12:35 PM, Andev <debiandev@gmail.com> wrote:
> On Tue, Apr 28, 2015 at 9:03 AM, leo kirotawa <kirotawa@gmail.com> wrote:
>> I could boot it using qemu. So what's the point?
>
> Could you try the attached config and see if it boots?
>
>>
>> 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 at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>>
>> --
>>
>> ----------------------------------------------
>> Le?nidas S. Barbosa (Kirotawa)
>> blog: corecode.wordpress.com
>
>
>
> --
> Andev



-- 

----------------------------------------------
Le?nidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 16:46         ` leo kirotawa
@ 2015-04-28 17:40           ` leo kirotawa
  2015-04-28 18:18             ` Andev
  0 siblings, 1 reply; 13+ messages in thread
From: leo kirotawa @ 2015-04-28 17:40 UTC (permalink / raw)
  To: kernelnewbies

With this .config you sent kernel does not boot.

On Tue, Apr 28, 2015 at 1:46 PM, leo kirotawa <kirotawa@gmail.com> wrote:
> that .config you sent is for 4.0-rc2, is that right?
>
>
> here is the diff after a make oldconfig [1]
>
> [1] http://pastebin.com/4Lfs2it0
>
> On Tue, Apr 28, 2015 at 12:35 PM, Andev <debiandev@gmail.com> wrote:
>> On Tue, Apr 28, 2015 at 9:03 AM, leo kirotawa <kirotawa@gmail.com> wrote:
>>> I could boot it using qemu. So what's the point?
>>
>> Could you try the attached config and see if it boots?
>>
>>>
>>> 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 at kernelnewbies.org
>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>>
>>>
>>> --
>>>
>>> ----------------------------------------------
>>> Le?nidas S. Barbosa (Kirotawa)
>>> blog: corecode.wordpress.com
>>
>>
>>
>> --
>> Andev
>
>
>
> --
>
> ----------------------------------------------
> Le?nidas S. Barbosa (Kirotawa)
> blog: corecode.wordpress.com



-- 

----------------------------------------------
Le?nidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 17:40           ` leo kirotawa
@ 2015-04-28 18:18             ` Andev
  2015-04-28 18:30               ` leo kirotawa
  0 siblings, 1 reply; 13+ messages in thread
From: Andev @ 2015-04-28 18:18 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Apr 28, 2015 at 1:40 PM, leo kirotawa <kirotawa@gmail.com> wrote:
> With this .config you sent kernel does not boot.

Yup, could you try to bisect what commit is causing this failure?

-- 
Andev

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 18:18             ` Andev
@ 2015-04-28 18:30               ` leo kirotawa
  2015-04-28 19:44                 ` Andev
  0 siblings, 1 reply; 13+ messages in thread
From: leo kirotawa @ 2015-04-28 18:30 UTC (permalink / raw)
  To: kernelnewbies

Yep, I can try. Do you know when this issue start ?

On Tue, Apr 28, 2015 at 3:18 PM, Andev <debiandev@gmail.com> wrote:
> On Tue, Apr 28, 2015 at 1:40 PM, leo kirotawa <kirotawa@gmail.com> wrote:
>> With this .config you sent kernel does not boot.
>
> Yup, could you try to bisect what commit is causing this failure?
>
> --
> Andev



-- 

----------------------------------------------
Le?nidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 18:30               ` leo kirotawa
@ 2015-04-28 19:44                 ` Andev
  2015-04-28 19:47                   ` nick
  0 siblings, 1 reply; 13+ messages in thread
From: Andev @ 2015-04-28 19:44 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Apr 28, 2015 at 2:30 PM, leo kirotawa <kirotawa@gmail.com> wrote:
> Yep, I can try. Do you know when this issue start ?
>

I remember 4.0 working fine. You can try and use that as starting point.

-- 
Andev

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 19:44                 ` Andev
@ 2015-04-28 19:47                   ` nick
  0 siblings, 0 replies; 13+ messages in thread
From: nick @ 2015-04-28 19:47 UTC (permalink / raw)
  To: kernelnewbies



On 2015-04-28 03:44 PM, Andev wrote:
> On Tue, Apr 28, 2015 at 2:30 PM, leo kirotawa <kirotawa@gmail.com> wrote:
>> Yep, I can try. Do you know when this issue start ?
>>
> 
> I remember 4.0 working fine. You can try and use that as starting point.
> 
Just a question as I have been reading this for a while,is this only for x86 or other
architectures too as I would advise to bisect/test his patch on ARM and other CPU
platforms too.
Nick 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28  5:41   ` Andev
  2015-04-28 13:03     ` leo kirotawa
@ 2015-04-28 20:29     ` Valdis.Kletnieks at vt.edu
  2015-04-28 21:17       ` Andev
  1 sibling, 1 reply; 13+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2015-04-28 20:29 UTC (permalink / raw)
  To: kernelnewbies

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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150428/46db9776/attachment.bin 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 20:29     ` Valdis.Kletnieks at vt.edu
@ 2015-04-28 21:17       ` Andev
  2015-04-28 21:24         ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 13+ messages in thread
From: Andev @ 2015-04-28 21:17 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* 4.1-rc1 fails with O3 optimization
  2015-04-28 21:17       ` Andev
@ 2015-04-28 21:24         ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 13+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2015-04-28 21:24 UTC (permalink / raw)
  To: kernelnewbies

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150428/cc5c2752/attachment-0001.bin 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-04-28 21:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27  2:03 4.1-rc1 fails with O3 optimization Andev
2015-04-28  1:00 ` Bobby Powers
2015-04-28  5:41   ` Andev
2015-04-28 13:03     ` leo kirotawa
     [not found]       ` <CAJUuVQ4i0UxQbCubaLbpUFzsnOcW_XrOf7MCA_qXoyX7qMzFPQ@mail.gmail.com>
2015-04-28 16:46         ` leo kirotawa
2015-04-28 17:40           ` leo kirotawa
2015-04-28 18:18             ` Andev
2015-04-28 18:30               ` leo kirotawa
2015-04-28 19:44                 ` Andev
2015-04-28 19:47                   ` nick
2015-04-28 20:29     ` Valdis.Kletnieks at vt.edu
2015-04-28 21:17       ` Andev
2015-04-28 21:24         ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.