xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Ben.Catterall@citrix.com
Cc: keir@xen.org, george.dunlap@eu.citrix.com,
	andrew.cooper3@citrix.com, tim@xen.org,
	Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH RFC v2 0/4] HVM x86 deprivileged mode operations
Date: Fri, 4 Sep 2015 10:16:02 +0100	[thread overview]
Message-ID: <1441358162.26292.445.camel@citrix.com> (raw)
In-Reply-To: <55E9738B020000780009F894@prv-mh.provo.novell.com>

On Fri, 2015-09-04 at 02:33 -0600, Jan Beulich wrote:
> > 
> > > > On 03.09.15 at 18:01, <Ben.Catterall@citrix.com> wrote:
> > I performed 100000 writes to a single I/O port on an Intel 2.2GHz Xeon
> > E5-2407 0 processor and an AMD Opteron 2376. This was done from a 
> > python 
> > script
> > within the HVM guest using time.time() and running Debian Jessie. Each 
> > write 
> > was
> > trapped to cause a vmexit and the time for each write was calculated. 
> > The 
> > port
> > operation is bypassed so that no portio is actually performed. Thus, 
> > the
> > differences in the measurements below can be taken as the pure 
> > overhead. 
> > These
> > experiments were repeated. Note that only the host and this HVM guest 
> > were
> > running (both Debian Jessie) during the experiments.
> > 
> > Intel Intel 2.2GHz Xeon E5-2407 0 processor:
> > --------------------------------------------
> > 1.55e-06 seconds was the average time for performing the write without 
> > the
> >          deprivileged code running.
> > 
> > 5.75e-06 seconds was the average time for performing the write with the
> >          deprivileged code running.
> > 
> > So approximately 351% overhead
> > 
> > AMD Opteron 2376:
> > -----------------
> > 1.74e-06 seconds was the average time for performing the write without 
> > the
> >          deprivileged code running.
> > 3.10e-06 seconds was the average time for performing the write with an 
> > entry 
> > and
> >          exit from deprvileged mode.
> > 
> > So approximately 178% overhead.
> 
> Just like said for v1: Determining a percentage of overhead is
> pretty meaningless when the actual operation (the I/O port
> access) can take significantly varying amount of time depending
> on which I/O port is being accessed. In particular, considering
> the built in devices emulation of which you want to move out,
> the majority shouldn't actually be doing any accesses to ports
> or MMIO, but just act on RAM. Which hence may take quite a
> bit less than the roughly 1.5us you use as the base line, in turn
> likely resulting in quite a bit higher relative overhead.

Ben says "no port io is actually performed", so I think the 1.5us is purely
the overhead of emulating an I/O access as a NOP.

> 
> That said - even the 350% you determined above look
> prohibitive to me.
> 
> Jan
> 

  reply	other threads:[~2015-09-04  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 16:01 [PATCH RFC v2 0/4] HVM x86 deprivileged mode operations Ben Catterall
2015-09-03 16:01 ` [PATCH RFC v2 1/4] HVM x86 deprivileged mode: Create deprivileged page tables Ben Catterall
2015-09-03 16:01 ` [PATCH RFC v2 2/4] HVM x86 deprivileged mode: Code for switching into/out of deprivileged mode Ben Catterall
2015-09-03 16:01 ` [PATCH RFC v2 3/4] HVM x86 deprivileged mode: Trap handlers for " Ben Catterall
2015-09-03 16:01 ` [PATCH RFC v2 4/4] HVM x86 deprivileged mode: Watchdog for DoS prevention Ben Catterall
2015-09-03 16:15 ` [PATCH RFC v2 0/4] HVM x86 deprivileged mode operations David Vrabel
2015-09-07 10:50   ` Ben Catterall
2015-09-04  8:33 ` Jan Beulich
2015-09-04  9:16   ` Ian Campbell [this message]
2015-09-04  9:31     ` Jan Beulich
2015-09-04 10:46 ` Fabio Fantoni
2015-09-08 10:58   ` Ben Catterall

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=1441358162.26292.445.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=Ben.Catterall@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).