public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: npiggin@suse.de, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, jbeulich@novell.com,
	torvalds@linux-foundation.org, a.p.zijlstra@chello.nl,
	tglx@linutronix.de
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:core/locking] locking, x86: Slightly shorten __ticket_spin_trylock()
Date: Wed, 2 Dec 2009 14:29:37 +0100	[thread overview]
Message-ID: <20091202132937.GA1564@elte.hu> (raw)
In-Reply-To: <tip-133ec7a235160dd44cbd4d82fff65a9983331df9@git.kernel.org>


* tip-bot for Jan Beulich <JBeulich@novell.com> wrote:

> Commit-ID:  133ec7a235160dd44cbd4d82fff65a9983331df9
> Gitweb:     http://git.kernel.org/tip/133ec7a235160dd44cbd4d82fff65a9983331df9
> Author:     Jan Beulich <JBeulich@novell.com>
> AuthorDate: Fri, 27 Nov 2009 15:09:16 +0000
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Wed, 2 Dec 2009 11:11:11 +0100
> 
> locking, x86: Slightly shorten __ticket_spin_trylock()

-tip testing found that this causes a boot regression (locking during 
boot):

commit 133ec7a235160dd44cbd4d82fff65a9983331df9
Author: Jan Beulich <JBeulich@novell.com>
Date:   Fri Nov 27 15:09:16 2009 +0000

    locking, x86: Slightly shorten __ticket_spin_trylock()
    
    Since the callers generally expect a boolean value, there's no
    need to zero-extend the outcome of the comparison. It just
    requires that all of x86' trylock implementations return bo

After a couple of silent hangs in random places during bootup i got one 
bootup that has a more telling output:

CPU1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ stepping 02
Brought up 2 CPUs
Total of 2 processors activated (8041.67 BogoMIPS).
BUG: spinlock wrong owner on CPU#0, swapper/1
 lock: 7b20b340, .magic: dead4ead, .owner: swapper/0, .owner_cpu: -1
Pid: 1, comm: swapper Not tainted 2.6.32-rc8-tip-02745-g401930b-dirty 
#9729
Call Trace:
 [<792a9959>] ? _raw_spin_unlock+0x46/0x76
 [<79a8729c>] ? _spin_unlock_irqrestore+0x8/0x12
 [<790268ae>] ? wait_task_inactive+0x73/0xa3
 [<7902a0b5>] ? kthread_bind+0x1e/0x8a
 [<79037b46>] ? start_workqueue_thread+0x13/0x1d
 [<79037f99>] ? __create_workqueue_key+0x10b/0x165
 [<7a02e26e>] ? init_workqueues+0x78/0x83
 [<7a01d2f4>] ? kernel_init+0x12b/0x1ae
 [<7a01d1c9>] ? kernel_init+0x0/0x1ae
 [<79002dbf>] ? kernel_thread_helper+0x7/0x10
device: 'platform': device_add
khelper used greatest stack depth: 3336 bytes left

at first quick sight, this bit looks odd:

+       union { int i; bool b; } new;

+       return new.b;

shouldnt that be short based, to work correctly in the 0-255 CPUs case?

	Ingo

  reply	other threads:[~2009-12-02 13:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 15:09 [PATCH] x86: slightly shorten __ticket_spin_trylock() Jan Beulich
2009-12-02 10:45 ` [tip:core/locking] locking, x86: Slightly " tip-bot for Jan Beulich
2009-12-02 13:29   ` Ingo Molnar [this message]
2009-12-02 14:06     ` Jan Beulich
2009-12-02 14:12       ` Avi Kivity
2009-12-02 14:25         ` Jan Beulich
2009-12-02 14:36           ` Avi Kivity
2009-12-02 14:59             ` Jan Beulich
2009-12-02 14:21       ` Ingo Molnar
2009-12-02 14:57         ` Jan Beulich
2009-12-02 15:33           ` Linus Torvalds
2009-12-02 15:26   ` Linus Torvalds
2009-12-02 16:24     ` Jan Beulich
2009-12-02 16:56       ` Linus Torvalds
2009-12-02 17:05         ` Linus Torvalds
2009-12-02 17:23           ` H. Peter Anvin
2009-12-02 17:48             ` Linus Torvalds
2009-12-02 17:58               ` H. Peter Anvin

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=20091202132937.GA1564@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=npiggin@suse.de \
    --cc=tglx@linutronix.de \
    --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