public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Ken Chen <kenchen@google.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: panic with tg_shares_up again?
Date: Tue, 23 Dec 2008 17:31:35 -0800	[thread overview]
Message-ID: <495190F7.1030708@kernel.org> (raw)
In-Reply-To: <b040c32a0812231707w7a1704c5y169b659a394ba2a7@mail.gmail.com>

Ken Chen wrote:
> On Tue, Dec 23, 2008 at 3:46 PM, Ken Chen <kenchen@google.com> wrote:
>> And from my local build of linux-tip with the patch, I have the
>> following assembly:
>>     1  ffffffff8023b74f:  48 8b 88 a8 00 00 00    mov    0xa8(%rax),%rcx
>>     2  ffffffff8023b756:  48 c7 45 d0 00 00 00    movq   $0x0,-0x30(%rbp)
>>     3  ffffffff8023b75d:  00
>>     4  ffffffff8023b75e:  48 85 c9                test   %rcx,%rcx
>>     5  ffffffff8023b761:  0f 95 c0                setne  %al
>>     6  ffffffff8023b764:  84 45 af                test   %al,-0x51(%rbp)
>>     7  ffffffff8023b767:  74 15                   je     ffffffff8023b77e
>>     8  ffffffff8023b769:  48 8b 45 b8             mov    -0x48(%rbp),%rax
>>     9  ffffffff8023b76d:  31 d2                   xor    %edx,%edx
>>    10  ffffffff8023b76f:  48 0f af c1             imul   %rcx,%rax
>>    11  ffffffff8023b773:  48 f7 75 b0             divq   -0x50(%rbp)
>>
>> line 6 is the compare against sd_rq_weight, but it was only to one
>> byte instead of the entire unsigned long.
>>
>> /me scratching my head ....
> 
> After a couple of hours joggling with type cast and different order in
> which these two variables are checked, the compiler I'm using seems to
> insist only check one byte out of sd_rq_weight.  I give up for the day
> and removed the 'static' function declaration of
> update_group_shares_cpu().  Without the 'static', the assembly looks
> alright to me.
> 
> I will ask compiler expert to see what's wrong with this code.  For
> now, the following add on patch seems generate correct x86 assembly
> code.

maybe my compiler has some problem too?  just upgrade to opensuse 11.1 last week.

yhlu@linux-mstp:~/xx/xx/kernel/tip/linux-2.6> gcc --version
gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  reply	other threads:[~2008-12-24  1:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 21:28 panic with tg_shares_up again? Yinghai Lu
2008-12-23 21:36 ` Ingo Molnar
2008-12-23 22:39   ` panic with tg_shares_up again? -- kexec Yinghai Lu
2008-12-23 23:46   ` panic with tg_shares_up again? Ken Chen
2008-12-24  1:07     ` Ken Chen
2008-12-24  1:31       ` Yinghai Lu [this message]
2008-12-24  6:20         ` Ken Chen

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=495190F7.1030708@kernel.org \
    --to=yinghai@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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