mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alok Kataria <akataria@vmware.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH: x86] Print the hypervisor returned tsc_khz during boot.
Date: Fri, 4 Sep 2009 09:49:38 +0200	[thread overview]
Message-ID: <20090904074938.GE20598@elte.hu> (raw)
In-Reply-To: <1251076103.29422.32.camel@ank32.eng.vmware.com>


* Alok Kataria <akataria@vmware.com> wrote:

> On an AMD-64 system the processor frequency that is printed during 
> system boot, may be different than the tsc frequency that was 
> returned by the hypervisor, due to value returned from 
> calibrate_cpu. For debugging timekeeping or other related issues 
> it might be better to get the tsc_khz value returned by the 
> hypervisor.
> 
> The patch below now prints the tsc frequency that the hypervisor 
> returned. Please consider for tip.
> 
> --
> Signed-off-by: Alok N Kataria <akataria@vmware.com>
> 
> Index: linux-tip-master/arch/x86/kernel/tsc.c
> ===================================================================
> --- linux-tip-master.orig/arch/x86/kernel/tsc.c	2009-08-23 17:53:44.000000000 -0700
> +++ linux-tip-master/arch/x86/kernel/tsc.c	2009-08-23 17:55:08.000000000 -0700
> @@ -405,7 +405,10 @@ unsigned long native_calibrate_tsc(void)
>  
>  	hv_tsc_khz = get_hypervisor_tsc_freq();
>  	if (hv_tsc_khz) {
> -		printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
> +		printk(KERN_INFO "TSC: Frequency read from the hypervisor : "
> +				"%lu.%03lu MHz\n",
> +				(unsigned long) hv_tsc_khz / 1000,
> +				(unsigned long) hv_tsc_khz % 1000);
>  		return hv_tsc_khz;
>  	}

Makes sense. Note, arch/x86/kernel/tsc.c changed recently so this 
patch does not apply anymore - mind merging it on top of that and 
re-send it?

Thanks,

	Ingo

  reply	other threads:[~2009-09-04  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24  1:08 Alok Kataria
2009-09-04  7:49 ` Ingo Molnar [this message]
2009-09-04 20:13   ` Alok Kataria
2009-09-20 18:30     ` [tip:x86/urgent] x86: " tip-bot for Alok Kataria

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=20090904074938.GE20598@elte.hu \
    --to=mingo@elte.hu \
    --cc=akataria@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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

Powered by JetHome