All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 0/4] pci: interrupt status/interrupt disable support
Date: Thu, 26 Nov 2009 15:34:09 +0200	[thread overview]
Message-ID: <20091126133409.GB31817@redhat.com> (raw)
In-Reply-To: <200911261321.39347.paul@codesourcery.com>

On Thu, Nov 26, 2009 at 01:21:39PM +0000, Paul Brook wrote:
> >> It's really not that much of a fast path. Unless you're doing something
> >> particularly obscure then even under heavy load you're unlikely to exceed
> >> a few kHz.
> >
> >I think with kvm, heavy disk stressing benchmark can get higher.
> 
> I'd still expect this to be the least of your problems. 
> 
> If nothing else you've at least one host signal delivery and/or thread context 
> switch in there.

iotread which does the signalling might be running in parallel
with the guest CPU.

> Not to mention the overhead to forwarding the interrupt to 
> the guest CPU.

This is often mitigated as KVM knows to inject the interrupt
on the next vmexit.

> > > Compared to the average PIC implementation, and the overhead of the
> > > actual CPU interrupt, I find it hard to believe that looping over
> > > precisely 4 entries has any real performance hit.
> > 
> > I don't think it is major, but I definitely have seen, in the past,
> > that extra branches and memory accesses have small but measureable effect
> > when taken in interrupt handler routines in drivers, and same should
> > apply here.
> > 
> > OTOH keeping the sum around is trivial.
> 
> Not entirely. You now have two different bits of information that you have to 
> keep consistent.

This is inherent in pci spec definition: interrupt status
bit in config space duplicates interrupt state.

> Unless you can show that this is performance critical code I strongly 
> recommend keeping it as simple as possible.
> 
> Paul

I don't see there is anything left show: interrupt delivery is *obviously*
performance critical: people are running *latency benchmarks* measuring
how fast a packet can get from an external interface into guest,
in microseconds. We definitely want to remove obvious waste there.


-- 
MST

  reply	other threads:[~2009-11-26 13:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 16:58 [Qemu-devel] [PATCH 0/4] pci: interrupt status/interrupt disable support Michael S. Tsirkin
2009-11-26  3:21 ` [Qemu-devel] " Isaku Yamahata
2009-11-26  9:48   ` Michael S. Tsirkin
2009-11-26 12:41     ` Paul Brook
2009-11-26 12:59       ` Michael S. Tsirkin
2009-11-26 13:21         ` Paul Brook
2009-11-26 13:34           ` Michael S. Tsirkin [this message]
2009-11-26 10:38   ` Michael S. Tsirkin
2009-11-26 13:11     ` Michael S. Tsirkin

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=20091126133409.GB31817@redhat.com \
    --to=mst@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /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.