kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, Gleb Natapov <gleb@redhat.com>,
	kvm-devel <kvm@vger.kernel.org>
Subject: Re: assign-dev: Purpose of interrupt_work
Date: Mon, 12 Oct 2009 22:44:55 +0200	[thread overview]
Message-ID: <4AD39547.6070506@web.de> (raw)
In-Reply-To: <20091012173651.GA3923@amt.cnet>

[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]

Marcelo Tosatti wrote:
> On Mon, Oct 12, 2009 at 11:07:28AM +0200, Jan Kiszka wrote:
>> Avi Kivity wrote:
>>> On 10/12/2009 09:50 AM, Jan Kiszka wrote:
>>>>> Apic is lockless. For ioapic/pic I used spinlocks initially, but Avi
>>>>> prefers mutexes. Theoretically it is possible to make them lockless,
>>>>> but code will be complex and eventually more slow, since more then two
>>>>> atomic operation will be used on irq injection path.
>>>>>      
>>>> Well, lockless is another thing.
>>>>
>>>> But also converting to spinlocks would indeed add some overhead:
>>>> irqsave/restore. But I wonder if this isn't worth it, at least when
>>>> looking at the (supposed to be fast) device passthrough scenario which
>>>> would be simpler and faster.
>>>>    
>>> I'm worried about disabling irqs for non-device-assignment cases.  It
>>> would be more palatable if ioapic was completely O(1) (there are some
>>> per-vcpu loops in there, shouldn't be too bad for 16 vcpus, but we want
>>> to scale).
>> Yeah, what a pity. That's likely not solvable in a generic way, given
>> that the guest finally decided how many VCPUs may listen to a line.
>>
>> OK, but dropping interrupt_work from the MSI path is still worthwhile,
>> and probably more future-proof anyway.
> 
> Seems appropriate to convert the process context work to threaded
> interrupt (instead of workqueue). That should help latency.
> 

Not for the trivial case (I want to avoid scheduling as far as possible).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

      reply	other threads:[~2009-10-12 20:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  7:03 assign-dev: Purpose of interrupt_work Jan Kiszka
2009-10-12  7:13 ` Gleb Natapov
2009-10-12  7:27   ` Jan Kiszka
2009-10-12  7:45     ` Gleb Natapov
2009-10-12  7:50       ` Jan Kiszka
2009-10-12  7:57         ` Gleb Natapov
2009-10-12  8:16           ` Jan Kiszka
2009-10-12  8:39             ` Gleb Natapov
2009-10-12  9:04               ` Jan Kiszka
2009-10-12  9:14                 ` Avi Kivity
2009-10-12  9:25                   ` Jan Kiszka
2009-10-12  9:30                     ` Avi Kivity
2009-10-12  9:38                       ` Gleb Natapov
2009-10-12  9:40                         ` Avi Kivity
2009-10-12  9:42                           ` Gleb Natapov
2009-10-12  9:14                 ` Gleb Natapov
2009-10-12  8:39         ` Avi Kivity
2009-10-12  9:05           ` Gleb Natapov
2009-10-12  9:07             ` Avi Kivity
2009-10-12  9:07           ` Jan Kiszka
2009-10-12  9:16             ` Avi Kivity
2009-10-12 17:36             ` Marcelo Tosatti
2009-10-12 20:44               ` Jan Kiszka [this message]

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=4AD39547.6070506@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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 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).