Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1541073

Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >= zero

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >= zero
Date 2016-12-13 14:50 +0100
Message-ID <sNVCW-1NI-17@gated-at.bofh.it> (permalink)
References <sNV9U-1DV-7@gated-at.bofh.it> <sNV9U-1DV-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 13, 2016 at 01:14:17PM -0000, Thomas Gleixner wrote:
> @@ -429,8 +447,13 @@ void check_tsc_sync_target(void)
>  	 * that the warp is not longer detectable when the observed warp
>  	 * value is used. In the worst case the adjustment needs to go
>  	 * through a 3rd run for fine tuning.
> +	 *
> +	 * But we must make sure that the value doesn't become negative
> +	 * otherwise TSC deadline timer will create an interrupt storm.
>  	 */
>  	cur->adjusted += cur_max_warp;
> +	if (cur->adjusted < 0)
> +		cur->adjusted = 0;
>  

So depending on how horrid we want to make this we could work around
this by increasing the ADJUST of the other CPUs by the amount we're
negative.

But yes, yuck.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch 2/2] x86/tsc: Force TSC_ADJUST register to value >= zero Thomas Gleixner <tglx@linutronix.de> - 2016-12-13 14:20 +0100
  Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >= zero Peter Zijlstra <peterz@infradead.org> - 2016-12-13 14:50 +0100
    Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >=  zero Thomas Gleixner <tglx@linutronix.de> - 2016-12-13 17:00 +0100
  [tip:x86/timers] x86/tsc: Force TSC_ADJUST register to value >=  zero tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-12-15 12:00 +0100
  Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >=  zero Thomas Gleixner <tglx@linutronix.de> - 2016-12-16 12:50 +0100
    Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >=  zero Thomas Gleixner <tglx@linutronix.de> - 2016-12-16 13:00 +0100
    Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >= zero Ingo Molnar <mingo@kernel.org> - 2016-12-16 13:10 +0100
    Re: [patch 2/2] x86/tsc: Force TSC_ADJUST register to value >=  zero Thomas Gleixner <tglx@linutronix.de> - 2016-12-16 14:40 +0100

csiph-web