From: Ingo Molnar <mingo@elte.hu>
To: Avi Kivity <avi@redhat.com>
Cc: Robin Holt <holt@sgi.com>, Thomas Gleixner <tglx@linutronix.de>,
Yinghai Lu <yinghai@kernel.org>, Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC 2/2] Make x86 calibrate_delay run in parallel.
Date: Thu, 31 Mar 2011 12:46:01 +0200 [thread overview]
Message-ID: <20110331104601.GA8577@elte.hu> (raw)
In-Reply-To: <4D9457BF.1040601@redhat.com>
* Avi Kivity <avi@redhat.com> wrote:
> On 03/31/2011 11:57 AM, Ingo Molnar wrote:
> >>
> >> I am not trying to be argumentative. I never got an understanding of
> >> what was going wrong with that earlier patch and am hoping for some
> >> understanding now.
> >
> > Well, if calibrate_delay() calls run in parallel then different
> > hyperthreads will impact each other.
>
> It's different but not more wrong. If delay() later runs on a thread whose
> sibling is busy, it will in fact give more accurate results.
No, it's actively wrong: because it makes the delay loop *run faster* when
other siblings
I.e. this shortens udelay(X)s potentially, which is far more dangerous than the
current conservative approach of potentially *lengthening* them.
> > Really, there's no good reason why every CPU should be calibrated on a
> > system running identical CPUs, right? Mixed-frequency systems are rather
> > elusive on x86.
>
> Good point. And udelay() users are probably not sensitive to accuracy anyway
> (which changes with load and thermal conditions).
True with one important distinction: they are only sensitive to one fact, that
the delay should not be *shorter* than specified. By shortening udelay() we
essentially overclock the hardware's tolerances - not good.
Thanks,
Ingo
next prev parent reply other threads:[~2011-03-31 10:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 1:58 [RFC 0/2] Speed large x86_64 system boot by calling calibrate_delay() in parallel Robin, Holt <holt
2010-12-15 1:58 ` [RFC 1/2] Pass loops_per_jiffy in and out of calibrate_delay() Robin, Holt <holt
2010-12-15 1:58 ` [RFC 2/2] Make x86 calibrate_delay run in parallel Robin, Holt <holt
2010-12-16 8:34 ` Thomas Gleixner
2011-03-31 4:46 ` Yinghai Lu
2011-03-31 6:50 ` Ingo Molnar
2011-03-31 6:58 ` Ingo Molnar
2011-03-31 9:37 ` Robin Holt
2011-03-31 9:57 ` Ingo Molnar
2011-03-31 10:30 ` Avi Kivity
2011-03-31 10:46 ` Ingo Molnar [this message]
2011-03-31 10:49 ` Avi Kivity
2011-03-31 11:13 ` Ingo Molnar
2011-03-31 11:50 ` Robin Holt
2011-03-31 9:29 ` Robin Holt
2011-03-31 14:25 ` Yinghai Lu
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=20110331104601.GA8577@elte.hu \
--to=mingo@elte.hu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.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 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.