From: Andrew Morton <akpm@osdl.org>
To: Andi Kleen <ak@suse.de>
Cc: ak@suse.de, rusty@rustcorp.com.au, manpreet@fabric7.com,
linux-kernel@vger.kernel.org, discuss@x86-64.org
Subject: Re: [PATCH] i386/x86-64: Fix timer SMP bootup race
Date: Fri, 14 Jan 2005 22:54:57 -0800 [thread overview]
Message-ID: <20050114225457.611cea19.akpm@osdl.org> (raw)
In-Reply-To: <20050115064315.GF22863@wotan.suse.de>
Andi Kleen <ak@suse.de> wrote:
>
> On Fri, Jan 14, 2005 at 10:28:41PM -0800, Andrew Morton wrote:
> > Andi Kleen <ak@suse.de> wrote:
> > >
> > > This fixes a long standing race in 2.6 i386/x86-64 SMP boot.
> > > The per CPU timers would only get initialized after an secondary
> > > CPU was running. But during initialization the secondary CPU would
> > > already enable interrupts to compute the jiffies. When a per
> > > CPU timer fired in this window it would run into a BUG in timer.c
> > > because the timer heap for that CPU wasn't fully initialized.
> >
> > Why don't we just not call calibrate_delay() on the secondaries? It
> > doesn't seem to do anything. That way we can leave local interrupts
> > disabled.
>
> It's used for the "accumulative bogomips". To quote Alan:
>
> /*
> * Allow the user to impress friends.
> */
>
> But taking it away doesn't help because the timer startup on the BP
> and the secondaries going into the idle loop isn't synchronized.
> You could add a synchronization step, but it would be far more
> complicated than fixing the ordering like I did.
I don't get it. By the time the secondaries enter the idle loop, they've
already run init_timers_cpu() anyway. You patch doesn't address a
secondary taking a timer interrupt prior to the BP having run
init_timers(), does it?
next prev parent reply other threads:[~2005-01-15 6:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-15 4:09 [PATCH] i386/x86-64: Fix timer SMP bootup race Andi Kleen
2005-01-15 5:09 ` Rusty Russell
2005-01-15 5:23 ` Andi Kleen
2005-01-15 7:34 ` Rusty Russell
2005-01-15 7:40 ` Andrew Morton
2005-01-15 7:59 ` Andi Kleen
2005-01-16 4:20 ` Rusty Russell
2005-01-16 5:34 ` Andi Kleen
2005-01-16 6:42 ` Rusty Russell
2005-01-15 6:28 ` Andrew Morton
2005-01-15 6:43 ` Andi Kleen
2005-01-15 6:54 ` Andrew Morton [this message]
2005-01-15 7:18 ` Andi Kleen
2005-01-17 2:34 ` Rusty Russell
2005-01-17 5:43 ` Andi Kleen
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=20050114225457.611cea19.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=discuss@x86-64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manpreet@fabric7.com \
--cc=rusty@rustcorp.com.au \
/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