All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"johnstul@us.ibm.com" <johnstul@us.ibm.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Zhouxiangjiu <zhouxiangjiu@huawei.com>,
	zhang yanying <zhuangyanying@huawei.com>
Subject: Re: VDSO pvclock may increase host cpu consumption, is this a problem?
Date: Mon, 31 Mar 2014 18:30:32 -0300	[thread overview]
Message-ID: <20140331213032.GA5866@amt.cnet> (raw)
In-Reply-To: <5339AB59.4050906@mit.edu>

On Mon, Mar 31, 2014 at 10:52:25AM -0700, Andy Lutomirski wrote:
> On 03/29/2014 01:47 AM, Zhanghailiang wrote:
> > 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?
> 
> Does pvclock serve any real purpose on systems with fully-functional
> TSCs?  The x86 guest implementation is awful, so it's about 2x slower
> than TSC.  It could be improved a lot, but I'm not sure I understand why
> it exists in the first place.

VM migration.

Can you explain why you consider it so bad ? How you think it could be
improved ?

> I certainly understand the goal of keeping the guest CLOCK_REALTIME is
> sync with the host, but pvclock seems like overkill for that.

VM migration.

  reply	other threads:[~2014-03-31 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20140331213032.GA5866@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=johnstul@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=tglx@linutronix.de \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhouxiangjiu@huawei.com \
    --cc=zhuangyanying@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.