xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* rdtsc strangeness on upstream kernel
@ 2010-07-19 23:19 Dan Magenheimer
  2010-07-19 23:34 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Magenheimer @ 2010-07-19 23:19 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel

Hi Jeremy --

In trying to understand some strange behavior I was
seeing on a RHEL6b2 guest, I ran across an interesting
anomaly, and it seems to be true on different upstream
(pvops) kernels.  At first I thought it was a result
of the xen_sched_clock->xen_clocksource_read patch
you recently posted, but after some testing this
appears to be unrelated.

The number of rdtsc/second goes up dramatically when
there is CPU-intensive load on an upstream kernel!
I know we both observed some cases where rdtsc/sec
was very high, but I don't think we ever were able to
reproduce this consistently.

First, this is a single vcpu, 64-bit 2.6.32 (RHEL6b2)
kernel.

I am observing ~300 rdtsc/sec on an idle VM.  When
I run a load of:

main() {while(1);}

I am observing about 10000 rdtsc/sec!!

This is a CONFIG_HZ_1000=y kernel, so I would
expect 1000 rdtsc/sec, or maybe 2000 rdtsc/sec,
but 10000 makes me wonder if there is some hidden
bug.

Changing to vcpus=2, the above numbers roughly
double... ~600 goes up to 20000 rdtsc/sec.
So clearly it is some kind of per-vcpu activity.

Any idea what kernel parts might be doing this?
I can instrument the xen rdtsc code to collect
some more information, but thought I'd get ideas
from you first.

Thanks,
Dan

P.S. Lest anyone panic about this, a rate of
10000 rdtsc/sec/vcpu should translate to ~1%
performance.  Not a catastrophe but still worth
understanding.

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

end of thread, other threads:[~2010-07-23 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 23:19 rdtsc strangeness on upstream kernel Dan Magenheimer
2010-07-19 23:34 ` Jeremy Fitzhardinge
2010-07-19 23:51   ` Dan Magenheimer
     [not found]     ` <681683ff-677b-4709-911e-3d90d7dbed7c@default4C44EF08.3070103@goop.org>
2010-07-19 23:55     ` Dan Magenheimer
2010-07-20  0:34       ` Jeremy Fitzhardinge
2010-07-20  0:42         ` Dan Magenheimer
2010-07-20  0:44           ` Jeremy Fitzhardinge
2010-07-23 16:47             ` Dan Magenheimer

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).