public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* VDSO pvclock may increase host cpu consumption, is this a problem?
@ 2014-03-29  8:47 Zhanghailiang
  2014-03-29 14:46 ` Marcelo Tosatti
  2014-03-31 17:52 ` Andy Lutomirski
  0 siblings, 2 replies; 13+ messages in thread
From: Zhanghailiang @ 2014-03-29  8:47 UTC (permalink / raw)
  To: mtosatti@redhat.com, johnstul@us.ibm.com, tglx@linutronix.de,
	kvm@vger.kernel.org
  Cc: linux-kernel@vger.kernel.org, Zhouxiangjiu, zhang yanying

Hi,
I found when Guest is idle, VDSO pvclock may increase host consumption.
We can calcutate as follow, Correct me if I am wrong.
      (Host)250 * update_pvclock_gtod = 1500 * gettimeofday(Guest)
In Host, VDSO pvclock introduce a notifier chain, pvclock_gtod_chain in timekeeping.c. It consume nearly 900 cycles per call. So in consideration of 250 Hz, it may consume 225,000 cycles per second, even no VM is created.
In Guest, gettimeofday consumes 220 cycles per call with VDSO pvclock. If the no-kvmclock-vsyscall is configured, gettimeofday consumes 370 cycles per call. The feature decrease 150 cycles consumption per call. 
When call gettimeofday 1500 times,it decrease 225,000 cycles,equal to the host consumption.
Both Host and Guest is linux-3.13.6.
So, whether the host cpu consumption is a problem?

Thanks.
Zhang hailiang

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

end of thread, other threads:[~2014-04-02 22:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29  8:47 VDSO pvclock may increase host cpu consumption, is this a problem? Zhanghailiang
2014-03-29 14:46 ` Marcelo Tosatti
2014-03-31  1:12   ` Zhanghailiang
2014-03-31 17:52 ` Andy Lutomirski
2014-03-31 21:30   ` Marcelo Tosatti
2014-04-01  5:33     ` Andy Lutomirski
2014-04-01 18:01       ` Marcelo Tosatti
2014-04-01 19:17         ` Andy Lutomirski
2014-04-02  0:12           ` Marcelo Tosatti
2014-04-02  0:20             ` Andy Lutomirski
     [not found]           ` <20140402002926.GB31945@amt.cnet>
2014-04-02  0:46             ` Andy Lutomirski
2014-04-02 22:05               ` Marcelo Tosatti
2014-04-02 22:31                 ` Andy Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox