[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <971109b3-3f80-c00a-1df6-12a8a3218700@collabora.com>
Date: Thu, 25 Aug 2022 12:21:52 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Cc: usama.anjum@...labora.com, Steven Noonan <steven@...inklabs.net>,
kernel@...labora.com
Subject: Re: [PATCH 1/3] x86/tsc: implement tsc=directsync for systems without
IA32_TSC_ADJUST
On 8/24/22 7:13 PM, Thomas Gleixner wrote:
> On Mon, Aug 08 2022 at 16:39, Muhammad Usama Anjum wrote:
>> From: Steven Noonan <steven@...inklabs.net>
>>
>> AMD processors don't implement any mechanism like Intel's
>> IA32_TSC_ADJUST MSR to sync the TSC. Instead of just relying on the
>> BIOS, TSC can be synced by calculating the difference and directly
>> writing it to the TSC MSR.
>
> Why? This has been tried before and is known to be flaky and
> unrealiable.
I'm sorry. I was trying to find the historic attempts about this. But I
didn't find it. Can someone point me to the history?
Do we have some information on how AMD synchronizes the TSC in BIOS? If
the ADJUST MSR like Intel's isn't present in AMD, they must be syncing
it by directly writing to the TSC MSR like this patch is doing.
>
>> Add directsync flag to turn on the TSC sync when IA32_TSC_MSR isn't
>> available. Attempt 1000 times or for 30 seconds before giving up.
>
> Looping 30 seconds with interrupts disabled? Seriously?
Yeah, that's too much. Some BSD variant uses 1000 attempts. We can
change the 1000 attempts to 5 or 10 attempts as in my experience, 5
attempts at max were always successful every time.
>
> Thanks,
>
> tglx
--
Muhammad Usama Anjum
Powered by blists - more mailing lists