xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* emulated tsc and frequency info
@ 2010-07-20  9:20 Juergen Gross
  2010-07-20 10:00 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2010-07-20  9:20 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

Hi,

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain
with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

In the shared info page the tsc_to_system_mul is still reflecting the host
cpu frequency instead of the emulated 1 GHz.

The reason is quite simple: tsc_set_info() is never called with a gtsc_khz
value other than 0. I wonder which solution is the correct one:
- if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).
- don't use 0 as default value for gtsc_khz when calling tsc_set_info()
   (this would require changes in the tools, too).
- let the domU check the vtsc-flag in cpuid-info and assume 1 GHz then (very
   ugly in my opinion).

Any thoughts?


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emulated tsc and frequency info
  2010-07-20  9:20 emulated tsc and frequency info Juergen Gross
@ 2010-07-20 10:00 ` Keir Fraser
  2010-07-20 11:52   ` Juergen Gross
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2010-07-20 10:00 UTC (permalink / raw)
  To: Juergen Gross, xen-devel@lists.xensource.com; +Cc: Dan Magenheimer

On 20/07/2010 10:20, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

> with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain
> with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):
> 
> In the shared info page the tsc_to_system_mul is still reflecting the host
> cpu frequency instead of the emulated 1 GHz.
> 
> The reason is quite simple: tsc_set_info() is never called with a gtsc_khz
> value other than 0. I wonder which solution is the correct one:
> - if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).

That sounds best to me. Cc'ing Dan as he may have an opinion.

 -- Keir

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emulated tsc and frequency info
  2010-07-20 10:00 ` Keir Fraser
@ 2010-07-20 11:52   ` Juergen Gross
  2010-07-20 12:28     ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2010-07-20 11:52 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Dan Magenheimer, xen-devel@lists.xensource.com

On 07/20/2010 12:00 PM, Keir Fraser wrote:
> On 20/07/2010 10:20, "Juergen Gross"<juergen.gross@ts.fujitsu.com>  wrote:
>
>> with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain
>> with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

correction: only xen 4.0 is affected!
xen-unstable does the scaling correctly.

>>
>> In the shared info page the tsc_to_system_mul is still reflecting the host
>> cpu frequency instead of the emulated 1 GHz.
>>
>> The reason is quite simple: tsc_set_info() is never called with a gtsc_khz
>> value other than 0. I wonder which solution is the correct one:
>> - if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).
>
> That sounds best to me. Cc'ing Dan as he may have an opinion.
>
>   -- Keir
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>


-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emulated tsc and frequency info
  2010-07-20 11:52   ` Juergen Gross
@ 2010-07-20 12:28     ` Keir Fraser
  2010-07-20 12:43       ` Juergen Gross
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2010-07-20 12:28 UTC (permalink / raw)
  To: Juergen Gross; +Cc: Dan, xen-devel@lists.xensource.com, Magenheimer

On 20/07/2010 12:52, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

>>> with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain
>>> with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):
> 
> correction: only xen 4.0 is affected!
> xen-unstable does the scaling correctly.

Is it still a problem with the latest 4.0.1 RC (or tip of xen-4.0-testing)?

 -- Keir

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emulated tsc and frequency info
  2010-07-20 12:28     ` Keir Fraser
@ 2010-07-20 12:43       ` Juergen Gross
  0 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2010-07-20 12:43 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Dan Magenheimer, xen-devel@lists.xensource.com

On 07/20/2010 02:28 PM, Keir Fraser wrote:
> On 20/07/2010 12:52, "Juergen Gross"<juergen.gross@ts.fujitsu.com>  wrote:
>
>>>> with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain
>>>> with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):
>>
>> correction: only xen 4.0 is affected!
>> xen-unstable does the scaling correctly.
>
> Is it still a problem with the latest 4.0.1 RC (or tip of xen-4.0-testing)?

Looking at hvm_get_guest_tsc() it should be okay, too.
Sorry for the noise :-(


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-20 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20  9:20 emulated tsc and frequency info Juergen Gross
2010-07-20 10:00 ` Keir Fraser
2010-07-20 11:52   ` Juergen Gross
2010-07-20 12:28     ` Keir Fraser
2010-07-20 12:43       ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).