public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>,
	linux-kernel@vger.kernel.org,
	Phil Carmody <ext-phil.2.carmody@nokia.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <johnstul@us.ibm.com>
Subject: Re: Fix for critical bogoMIPS intermittent calculation failure
Date: Tue, 31 May 2011 13:58:45 +0200	[thread overview]
Message-ID: <1306843125.2353.7.camel@twins> (raw)
In-Reply-To: <20110407151745.d2e682c6.akpm@linux-foundation.org>

On Thu, 2011-04-07 at 15:17 -0700, Andrew Morton wrote:
> On Thu, 10 Mar 2011 17:03:51 +1100
> Andrew Worsley <amworsley@gmail.com> wrote:
> 

> Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  init/calibrate.c |   70 +++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 65 insertions(+), 5 deletions(-)
> 
> diff -puN init/calibrate.c~init-calibratec-fix-for-critical-bogomips-intermittent-calculation-failure init/calibrate.c
> --- a/init/calibrate.c~init-calibratec-fix-for-critical-bogomips-intermittent-calculation-failure
> +++ a/init/calibrate.c
> @@ -38,6 +38,9 @@ static unsigned long __cpuinit calibrate
>  	unsigned long timer_rate_min, timer_rate_max;
>  	unsigned long good_timer_sum = 0;
>  	unsigned long good_timer_count = 0;
> +	unsigned long measured_times[MAX_DIRECT_CALIBRATION_RETRIES];
> +	int max = -1; /* index of measured_times with max/min values or not set */
> +	int min = -1;
>  	int i;
>  
>  	if (read_current_timer(&pre_start) < 0 )
> @@ -90,17 +93,74 @@ static unsigned long __cpuinit calibrate
>  		 * If the upper limit and lower limit of the timer_rate is
>  		 * >= 12.5% apart, redo calibration.
>  		 */
> -		if (pre_start != 0 && pre_end != 0 &&
> +		printk(KERN_DEBUG
> +"calibrate_delay_direct() timer_rate_max=%lu timer_rate_min=%lu pre_start=%lu pre_end=%lu\n",
> +			  timer_rate_max, timer_rate_min, pre_start, pre_end);


Can we please remove this printk(), I'm not really enjoying the 120
lines of dmesg spew this creates on my dev-box.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 init/calibrate.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/init/calibrate.c b/init/calibrate.c
index cfd7000..a24efd3 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -93,14 +93,12 @@ static unsigned long __cpuinit calibrate_delay_direct(void)
 		 * If the upper limit and lower limit of the timer_rate is
 		 * >= 12.5% apart, redo calibration.
 		 */
-		printk(KERN_DEBUG "calibrate_delay_direct() timer_rate_max=%lu "
-			    "timer_rate_min=%lu pre_start=%lu pre_end=%lu\n",
-			  timer_rate_max, timer_rate_min, pre_start, pre_end);
-		if (start >= post_end)
+		if (start >= post_end) {
 			printk(KERN_NOTICE "calibrate_delay_direct() ignoring "
 					"timer_rate as we had a TSC wrap around"
 					" start=%lu >=post_end=%lu\n",
 				start, post_end);
+		}
 		if (start < post_end && pre_start != 0 && pre_end != 0 &&
 		    (timer_rate_max - timer_rate_min) < (timer_rate_max >> 3)) {
 			good_timer_count++;


      parent reply	other threads:[~2011-05-31 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  6:03 Fix for critical bogoMIPS intermittent calculation failure Andrew Worsley
2011-04-07 22:17 ` Andrew Morton
2011-04-11 13:00   ` Phil Carmody
2011-05-31 11:58   ` Peter Zijlstra [this message]

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=1306843125.2353.7.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=amworsley@gmail.com \
    --cc=ext-phil.2.carmody@nokia.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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