mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: mike.travis@hpe.com
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Bin Gao <bin.gao@linux.intel.com>,
	Prarit Bhargava <prarit@redhat.com>,
	Dimitri Sivanich <dimitri.sivanich@hpe.com>,
	Andrew Banman <andrew.banman@hpe.com>,
	Russ Anderson <russ.anderson@hpe.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH 2/5] x86/kernel: Skip TSC test and error messages if already unstable
Date: Thu, 12 Oct 2017 13:17:12 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1710121314440.1930@nanos> (raw)
In-Reply-To: <20171005164716.507003714@stormcage.americas.sgi.com>

On Thu, 5 Oct 2017, mike.travis@hpe.com wrote:

> If the TSC has already been determined to be unstable, then checking
> TSC ADJUST values is a waste of time and generates unnecessary error
> messages.
> 
> Signed-off-by: Mike Travis <mike.travis@hpe.com>
> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com>
> Reviewed-by: Russ Anderson <russ.anderson@hpe.com>
> Reviewed-by: Peter Zijlstra <peterz@infradead.org>
> ---
>  arch/x86/kernel/tsc_sync.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> --- linux.orig/arch/x86/kernel/tsc_sync.c
> +++ linux/arch/x86/kernel/tsc_sync.c
> @@ -38,6 +38,10 @@ void tsc_verify_tsc_adjust(bool resume)
>  	if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST))
>  		return;
>  
> +	/* Skip unnecessary error messages if TSC already unstable */
> +	if (check_tsc_unstable())
> +		return;
> +
>  	/* Rate limit the MSR check */
>  	if (!resume && time_before(jiffies, adj->nextcheck))
>  		return;
> @@ -89,6 +93,10 @@ bool tsc_store_and_check_tsc_adjust(bool
>  	if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST))
>  		return false;
>  
> +	/* Skip unnecessary error messages if TSC already unstable */
> +	if (check_tsc_unstable())
> +		return false;
> +
>  	rdmsrl(MSR_IA32_TSC_ADJUST, bootval);
>  	cur->bootval = bootval;
>  	cur->adjusted = bootval;

This hunk rejects and I really can't figure out against which tree that
would apply.

Btw, there are two incarnations of tsc_store_and_check_tsc_adjust().
Shouldn't the !SMP variant get the same treatment?

Thanks,

	tglx

  reply	other threads:[~2017-10-12 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 16:47 [PATCH 0/5] x86/platform/UV: Update TSC support mike.travis
2017-10-05 16:47 ` [PATCH 1/5] x86/kernel: Add option that TSC on Socket 0 being non-zero is valid mike.travis
2017-10-05 16:47 ` [PATCH 2/5] x86/kernel: Skip TSC test and error messages if already unstable mike.travis
2017-10-12 11:17   ` Thomas Gleixner [this message]
2017-10-12 15:17     ` Mike Travis
2017-10-12 15:22       ` Thomas Gleixner
2017-10-12 16:35         ` Mike Travis
2017-10-05 16:47 ` [PATCH 3/5] x86/kernel: Drastically reduce the number of firmware bug warnings mike.travis
2017-10-05 16:47 ` [PATCH 4/5] x86/kernel: Provide a means to disable TSC ART mike.travis
2017-10-05 16:47 ` [PATCH 5/5] x86/platform/UV: Add check of TSC state set by UV BIOS mike.travis
  -- strict thread matches above, loose matches on Subject: below --
2017-10-12 16:32 [PATCH 0/5] x86/platform/UV: Update TSC support mike.travis
2017-10-12 16:32 ` [PATCH 2/5] x86/kernel: Skip TSC test and error messages if already unstable mike.travis
2017-10-02 15:12 [PATCH 0/5] x86/platform/UV: Update TSC support mike.travis
2017-10-02 15:12 ` [PATCH 2/5] x86/kernel: Skip TSC test and error messages if already unstable 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=alpine.DEB.2.20.1710121314440.1930@nanos \
    --to=tglx@linutronix.de \
    --cc=andrew.banman@hpe.com \
    --cc=bin.gao@linux.intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.travis@hpe.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=prarit@redhat.com \
    --cc=russ.anderson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®