linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Krause <xerofoify@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Michel Dänzer" <michel@daenzer.net>,
	"Jakub Jelinek" <jakub@redhat.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Debian GCC Maintainers" <debian-gcc@lists.debian.org>,
	"Debian Kernel Team" <debian-kernel@lists.debian.org>
Subject: Re: Random panic in load_balance() with 3.16-rc
Date: Thu, 24 Jul 2014 22:50:19 -0400	[thread overview]
Message-ID: <CAPDOMViUrYWj_26sUbougDvWFpeOaMQc3_Po3ewHhrQYbJ6U5A@mail.gmail.com> (raw)
In-Reply-To: <CA+55aFyHbtsrhnr9Xb8JnFfrq=0Bobb=Q819dCjMwA4apwootQ@mail.gmail.com>

On Thu, Jul 24, 2014 at 10:33 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Jul 24, 2014 at 6:25 PM, Michel Dänzer <michel@daenzer.net> wrote:
>>
>> Attached is fair.s from Debian gcc 4.8.3-5. Does that look better? I'm
>> going to try reproducing the problem with a kernel built by that now.
>
> This looks better. For roughly that same code sequence it does
> (ignoring the debug line and cfi information):
>
>         subq    $184, %rsp      #,
>         movq    (%r12), %rax    # sd_22(D)->parent, sd_parent
>         movl    %edi, -156(%rbp)        # this_cpu, %sfp
>         movl    %ecx, -160(%rbp)        # idle, %sfp
>         movq    %r8, -184(%rbp) # continue_balancing, %sfp
>         movq    %rax, -176(%rbp)        # sd_parent, %sfp
>         movq    $load_balance_mask, %rax        #, tcp_ptr__
> #APP
>         add %gs:this_cpu_off, %rax      # this_cpu_off, tcp_ptr__
> #NO_APP
>
> so it updates the stack pointer before any spills, and it also doesn't
> spill that constant value.
>
> I still have no idea why it does the 4-byte rep stosl/movsl thing, but
> that's a whole separate guessing game and might have something to do
> with the fact that you do CONFIG_CC_OPTIMIZE_FOR_SIZE and the 4-byte
> form is one byte smaller.
>
> I'm a big believer in not blowing up the I$ footprint, and I have to
> admit to pushing that myself a few years ago, but gcc does some rather
> bad things with '-Os', so it's not actually suggested for the kernel
> any more. I wish there was some middle ground model that cared about
> size, but not to exclusion of everything else. The string instructions
> are not good for performance when it's a compile-time known small
> size.
>
>                  Linus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


Seems better after looking at it too, seems I don't need to test this and this
bug is in gcc 4.9 related versions.
Cheers Nick

  reply	other threads:[~2014-07-25  2:50 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53C77BB8.6030804@daenzer.net>
2014-07-17  7:58 ` Random panic in load_balance() with 3.16-rc Peter Zijlstra
2014-07-18  9:29   ` Michel Dänzer
2014-07-22  6:13     ` Michel Dänzer
2014-07-23  3:53       ` Michel Dänzer
2014-07-23  4:21         ` Linus Torvalds
2014-07-23  6:49           ` Peter Zijlstra
2014-07-23  8:05             ` Michel Dänzer
2014-07-23  8:28               ` Peter Zijlstra
2014-07-23  9:25                 ` Peter Zijlstra
2014-07-23  9:31                   ` Michel Dänzer
2014-07-23  9:45                     ` Dietmar Eggemann
2014-07-23 11:11                       ` Peter Zijlstra
2014-07-23 11:30                         ` Peter Zijlstra
2014-07-23 14:24                           ` Peter Zijlstra
2014-07-23 14:38                             ` Michel Dänzer
2014-07-23 15:51                             ` Linus Torvalds
     [not found]                               ` <20140723155526.GW3935@laptop>
2014-07-23 16:54                                 ` Linus Torvalds
2014-07-23 17:03                                   ` Peter Zijlstra
2014-07-23 17:12                                     ` Linus Torvalds
2014-07-23 17:26                                       ` Linus Torvalds
2014-07-23 18:25                                         ` Peter Zijlstra
2014-07-23 18:35                                           ` Linus Torvalds
2014-07-23 18:41                                             ` Peter Zijlstra
2014-07-23 18:55                                               ` Linus Torvalds
2014-07-23 19:02                                                 ` Peter Zijlstra
2014-07-23 19:20                                                   ` Linus Torvalds
2014-07-24  1:43                                                     ` Michel Dänzer
2014-07-24 18:47                                                       ` Linus Torvalds
2014-07-24 18:59                                                         ` Peter Zijlstra
2014-07-25  1:25                                                         ` Michel Dänzer
2014-07-25  2:33                                                           ` Linus Torvalds
2014-07-25  2:50                                                             ` Nick Krause [this message]
2014-07-25  2:36                                                           ` Nick Krause
2014-07-25  3:55                                                           ` Alexei Starovoitov
2014-07-25  4:00                                                             ` Nick Krause
2014-07-25 14:02                                                             ` Steven Rostedt
2014-07-25 18:29                                                               ` Linus Torvalds
2014-07-25 19:10                                                                 ` Steven Rostedt
2014-07-25 20:01                                                                 ` Linus Torvalds
2014-07-25 20:13                                                                   ` Steven Rostedt
2014-07-25 21:25                                                                   ` Jakub Jelinek
2014-07-26 18:28                                                                 ` Linus Torvalds
2014-07-26 18:39                                                                   ` Linus Torvalds
2014-07-26 19:35                                                                     ` Markus Trippelsdorf
2014-07-26 19:55                                                                       ` Theodore Ts'o
2014-07-26 20:20                                                                         ` Markus Trippelsdorf
2014-07-26 22:08                                                                           ` Jakub Jelinek
2014-07-26 19:56                                                                       ` Linus Torvalds
2014-07-26 20:03                                                                         ` Linus Torvalds
2014-07-26 20:19                                                                         ` Markus Trippelsdorf
2014-07-26 20:39                                                                           ` Linus Torvalds
2014-07-28 12:26                                                                             ` Frank Ch. Eigler
2014-07-28 13:10                                                                               ` Theodore Ts'o
2014-07-28 14:11                                                                                 ` Frank Ch. Eigler
2014-07-28 16:45                                                                               ` Linus Torvalds
2014-07-28 17:27                                                                                 ` Alexei Starovoitov
2014-07-28 18:09                                                                                   ` Markus Trippelsdorf
2014-07-28 18:28                                                                                     ` Linus Torvalds
2014-07-28 18:41                                                                                       ` Markus Trippelsdorf
2014-07-29  8:58                                                                                     ` Jakub Jelinek
2014-07-28 19:50                                                                                   ` Theodore Ts'o
2014-07-28  3:47                                                                         ` Michel Dänzer
2014-07-28 16:48                                                                           ` Linus Torvalds
2014-07-29  2:29                                                                             ` Michel Dänzer
2014-08-05  3:19                                                                 ` Steven Rostedt
2014-07-26 18:02                                                           ` Steven Chamberlain
2014-07-29  9:20                                                             ` Michel Dänzer
2014-07-25  6:48                                                         ` Jakub Jelinek
2014-07-25  8:15                                                           ` Linus Torvalds
2014-07-25  9:03                                                             ` Michel Dänzer
2014-07-25  9:21                                                               ` Markus Trippelsdorf
2014-07-25  9:42                                                                 ` Markus Trippelsdorf
2014-07-23 18:07                                       ` Linus Torvalds
2014-07-23 18:31                                         ` Peter Zijlstra
2014-07-23 18:24                                       ` Peter Zijlstra
2014-07-23 17:04                                   ` Peter Zijlstra
2014-07-23 17:15                                     ` Linus Torvalds
2014-07-23 18:25                                       ` Peter Zijlstra
2014-07-23 18:23                                   ` Peter Zijlstra
2014-07-23 10:52                     ` Peter Zijlstra
2014-07-24  7:18                     ` Michel Dänzer
2014-07-24  7:51                       ` Peter Zijlstra
2014-07-24  9:55                         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDOMViUrYWj_26sUbougDvWFpeOaMQc3_Po3ewHhrQYbJ6U5A@mail.gmail.com \
    --to=xerofoify@gmail.com \
    --cc=debian-gcc@lists.debian.org \
    --cc=debian-kernel@lists.debian.org \
    --cc=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@daenzer.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).