mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Serge Belyshev <belyshev@depni.sinp.msu.ru>
To: john stultz <johnstul@us.ibm.com>
Cc: George Spelvin <linux@horizon.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	ulrich.windl@rz.uni-regensburg.de, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, Clark Williams <williams@redhat.com>,
	zippel@linux-m68k.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] tsc_khz= boot option to avoid TSC calibration variance
Date: Tue, 12 May 2009 17:20:00 +0400	[thread overview]
Message-ID: <87d4aejw5b.fsf@depni.sinp.msu.ru> (raw)
In-Reply-To: <1242094321.7214.156.camel@localhost.localdomain> (john stultz's message of "Mon, 11 May 2009 19:12:01 -0700")

john stultz <johnstul@us.ibm.com> writes:

> Once the tsc_khz value is set in grub, the box will always boot with the
                                                      ^^^^^^
> same value, so the NTP drift value prior to reboot will still be correct
> after rebooting.
No, it won't, because...

>  	tsc_khz = calibrate_tsc();
> +
> +	/*
> +	 * If the calibrated TSC freq and user specified
> +	 * TSC freq are close enough, pick the what the
> +	 * user told us.
> +	 */
> +	difference = abs(tsc_khz - tsc_khz_specified);
> +	if (difference <= tsc_khz >> 10) {      /* 1/1024 = 976 ppm */
> +		printk(KERN_INFO "Using user defined TSC freq: %lu.%03lu MHz\n",
> +			tsc_khz_specified/1000,
> +			tsc_khz_specified%1000);
> +		tsc_khz = tsc_khz_specified;
> +	}
> +

... of this "if".

Please *please* don't set arbitrary limits.  Just use user supplied value.

Or at the very least print big red warning if you are going to ignore a user
supplied option (and have another tsc_khz_really= option to override faulty
calibration routine).

  parent reply	other threads:[~2009-05-12 13:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12  2:12 john stultz
2009-05-12  8:36 ` Ulrich Windl
2009-05-12 22:26   ` john stultz
2009-05-12 22:42     ` Thomas Gleixner
2009-05-12 23:02       ` john stultz
2009-05-13  9:41         ` Petri Kaukasoina
2009-05-13  7:59       ` Ulrich Windl
2009-05-13  9:23         ` Petri Kaukasoina
2009-05-13 10:06           ` Petri Kaukasoina
2009-05-12 13:20 ` Serge Belyshev [this message]
2009-05-12 23:31   ` john stultz
2009-05-13 18:45   ` George Spelvin

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=87d4aejw5b.fsf@depni.sinp.msu.ru \
    --to=belyshev@depni.sinp.msu.ru \
    --cc=akpm@linux-foundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    --cc=williams@redhat.com \
    --cc=zippel@linux-m68k.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

Powered by JetHome