From: Peter Zijlstra <peterz@infradead.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Olof Johansson <olof@lixom.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [GIT pull] x86/timers for 4.10
Date: Thu, 23 Feb 2017 10:17:22 +0100 [thread overview]
Message-ID: <20170223091722.GY6515@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1487838006.4463.34.camel@gmx.de>
On Thu, Feb 23, 2017 at 09:20:06AM +0100, Mike Galbraith wrote:
> On Thu, 2017-02-09 at 16:07 +0100, Thomas Gleixner wrote:
> > Can you share your cheatery ?
>
> I can do better than that... sorta ;-)
>
> x86/tsc: Fix unreliable tsc adjust
>
> On a 4 socket BIOS challenged box (4x18), the magic number '3' does
> not work reliably, resulting in TSC being disabled more often than not.
>
> Replace defective magic number '3' with functional magic number '5',
> derived via scientific method number sockets in afflicted box, plus
> one for good luck, and reboot box a lot to validate (poke 'n' hope).
>
> Signed-off-by: Mike Galbraith <efault@gmx.de>
> ---
> arch/x86/kernel/tsc_sync.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/arch/x86/kernel/tsc_sync.c
> +++ b/arch/x86/kernel/tsc_sync.c
> @@ -294,7 +294,7 @@ void check_tsc_sync_source(int cpu)
> if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST))
> atomic_set(&test_runs, 1);
> else
> - atomic_set(&test_runs, 3);
> + atomic_set(&test_runs, 5);
> retry:
> /*
> * Wait for the target to start or to skip the test:
Confirmed on another box too; the default of 3 wasn't sufficient to
achieve sync. When upping it to 16, sync was achieved in around 4 runs
or so.
next prev parent reply other threads:[~2017-02-23 9:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-18 20:06 [GIT pull] x86/timers for 4.10 Thomas Gleixner
2017-02-07 1:31 ` Olof Johansson
2017-02-08 11:44 ` Thomas Gleixner
2017-02-08 13:04 ` Mike Galbraith
2017-02-09 15:07 ` Thomas Gleixner
2017-02-09 15:16 ` Mike Galbraith
2017-02-09 15:21 ` Thomas Gleixner
2017-02-09 15:25 ` Mike Galbraith
2017-02-09 15:39 ` Thomas Gleixner
2017-02-23 8:20 ` Mike Galbraith
2017-02-23 9:17 ` Peter Zijlstra [this message]
2017-02-23 10:26 ` Borislav Petkov
2017-02-23 13:29 ` Mike Galbraith
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=20170223091722.GY6515@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=olof@lixom.net \
--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