All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Travis <mike.travis@hpe.com>, Borislav Petkov <bp@alien8.de>,
	Ingo Molnar <mingo@redhat.com>, Steve Wahl <steve.wahl@hpe.com>,
	x86@kernel.org
Cc: Mike Travis <mike.travis@hpe.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Andy Shevchenko <andy@infradead.org>,
	Darren Hart <dvhart@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v3 2/3] x86/platform/uv: Update TSC sync state for UV5
Date: Tue, 05 Apr 2022 02:47:04 +0200	[thread overview]
Message-ID: <87zgl02w6v.ffs@tglx> (raw)
In-Reply-To: <20220404174111.262414-3-mike.travis@hpe.com>

Mike,

On Mon, Apr 04 2022 at 12:41, Mike Travis wrote:
> Update to not check TSC sync state for uv5+ as it is not available.
> It is assumed that TSC will always be in sync for multiple chassis and
> will pass the tests for the kernel to accept it as the clocksource.
> To disable this check use the kernel start options tsc=reliable
> clocksource=tsc.
...
> ---
> v2: Update patch description to be more explanatory.

after reading the above word salad, I have no urge to go back to V1 to
figure out how bad that changelog was. Let me walk through it:

> Update to not check TSC sync state for uv5+ as it is not available.

That's not a sentence and it does not provide any information about the
background and the why. See:

  https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog

for further explanation.

> It is assumed that TSC will always be in sync for multiple chassis and
> will pass the tests for the kernel to accept it as the clocksource.

"It is assumed" is a real convincing technical argument - NOT!

Either the hardware guarantees something or not. If the hardware cannot
guarantee it but does not provide a mechanism to verify it then spell it
out:

  "UV5 gave up on providing an interface which allows to query the TSC
   synchronization state. The hardware/firmware specification defines
   that TSC is synchronized accross multiple chassis, but there is
   neither a guarantee nor a validation mechanism. This leaves the
   kernel with the only option to assume that TSC is synchronized and
   TSC_ADJUST might be different between sockets due to UV5+ firmware
   synchronization."

> To disable this check use the kernel start options tsc=reliable
> clocksource=tsc.

So now it get's really confusing. Which check? The one in your 
explanatory description above:

  "Update to not check TSC sync state for uv5+ as it is not available."

or what?

I can assume what are you trying to tell me here, but that's not a
qualification for 'explanatory'

> Signed-off-by: Mike Travis <mike.travis@hpe.com>
> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com>
> Reviewed-by: Steve Wahl <steve.wahl@hpe.com>

Impressive list of Reviewed-by tags. Just for clarification:

  Reviewed-by tags include the changelog part.

> ---
>  arch/x86/kernel/apic/x2apic_uv_x.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
> index f5a48e66e4f5..387d6533549a 100644
> --- a/arch/x86/kernel/apic/x2apic_uv_x.c
> +++ b/arch/x86/kernel/apic/x2apic_uv_x.c
> @@ -199,10 +199,16 @@ static void __init uv_tsc_check_sync(void)
>  	int mmr_shift;
>  	char *state;
>  
> -	/* Different returns from different UV BIOS versions */
> +	/* UV5+, sync state from bios not available, assumed valid */
> +	if (!is_uv(UV2|UV3|UV4)) {
> +		pr_debug("UV: TSC sync state for UV5+ assumed valid\n");

UV advertises its version all over the place and the call here:

> +		mark_tsc_async_resets("UV5+");

emits the reason at info level. So you surely need the pr_debug() above
to figure out that your code works as expected. You just failed to add
the obviuos counterpart:

          pr_debug("After calling hello_world()!\n");
          
Seriously. Neither the changelog nor the comment above the condition
qualify for explanatory or useful. Please try again.

> +
> +	/* UV2,3,4, UV BIOS TSC sync state available */
>  	mmr = uv_early_read_mmr(UVH_TSC_SYNC_MMR);
> -	mmr_shift =
> -		is_uv2_hub() ? UVH_TSC_SYNC_SHIFT_UV2K : UVH_TSC_SYNC_SHIFT;
> +	mmr_shift = is_uv2_hub() ? UVH_TSC_SYNC_SHIFT_UV2K : UVH_TSC_SYNC_SHIFT;

How is this change related to the problem which this patch tries to
solve? Documentation/process/* applies to UV too. You definitely should
know that by now.

Thanks,

        tglx

  reply	other threads:[~2022-04-05  1:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 17:41 [PATCH v3 0/3] x86/platform/uv: UV Kernel support for UV5 Mike Travis
2022-04-04 17:41 ` [PATCH v3 1/3] x86/platform/uv: Update NMI Handler " Mike Travis
2022-04-04 17:41 ` [PATCH v3 2/3] x86/platform/uv: Update TSC sync state " Mike Travis
2022-04-05  0:47   ` Thomas Gleixner [this message]
2022-04-04 17:41 ` [PATCH v3 3/3] x86/platform/uv: Log gap hole end size Mike Travis
2022-04-04 17:48 ` [PATCH v3 0/3] x86/platform/uv: UV Kernel support for UV5 Borislav Petkov
2022-04-04 17:56   ` Travis, Mike
  -- strict thread matches above, loose matches on Subject: below --
2022-03-18 22:43 Mike Travis
2022-03-18 22:43 ` [PATCH v3 2/3] x86/platform/uv: Update TSC sync state " Mike Travis

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=87zgl02w6v.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=andy@infradead.org \
    --cc=bp@alien8.de \
    --cc=dimitri.sivanich@hpe.com \
    --cc=dvhart@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.travis@hpe.com \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.com \
    --cc=x86@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.