kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/8 v2] Change irq routing table to use gsi indexed array.
Date: Wed, 12 Aug 2009 11:41:14 +0300	[thread overview]
Message-ID: <20090812084114.GX4764@redhat.com> (raw)
In-Reply-To: <4A8277B2.8010008@redhat.com>

On Wed, Aug 12, 2009 at 11:05:06AM +0300, Avi Kivity wrote:
> On 08/11/2009 03:31 PM, Gleb Natapov wrote:
>> Use gsi indexed array instead of scanning all entries on each interrupt
>> injection.
>>
>>
>> @@ -163,20 +166,23 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level)
>>
>>   void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
>>   {
>> -	struct kvm_kernel_irq_routing_entry *e;
>>   	struct kvm_irq_ack_notifier *kian;
>>   	struct hlist_node *n;
>>   	unsigned gsi = pin;
>> +	int i;
>>
>>   	trace_kvm_ack_irq(irqchip, pin);
>>
>> -	list_for_each_entry(e,&kvm->irq_routing, link)
>> +	for (i = 0; i<  kvm->irq_routing->nr_rt_entries; i++) {
>> +		struct kvm_kernel_irq_routing_entry *e;
>> +		e =&kvm->irq_routing->rt_entries[i];
>>   		if (e->type == KVM_IRQ_ROUTING_IRQCHIP&&
>>   		e->irqchip.irqchip == irqchip&&
>>   		e->irqchip.pin == pin) {
>>   			gsi = e->gsi;
>>   			break;
>>   		}
>> +	}
>>    
>
> Don't you need to iterate over all the entries for a gsi?
>
One pin/irqchip cannot be mapped to more than one GSI. Besides
this is what the current code does.

--
			Gleb.

  reply	other threads:[~2009-08-12  8:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 12:31 [PATCH 0/8 v2] make interrupt injection lockless (almost) Gleb Natapov
2009-08-11 12:31 ` [PATCH 1/8 v2] Change irq routing table to use gsi indexed array Gleb Natapov
2009-08-12  8:05   ` Avi Kivity
2009-08-12  8:41     ` Gleb Natapov [this message]
2009-08-12  9:06       ` Avi Kivity
2009-08-11 12:31 ` [PATCH 2/8 v2] Maintain back mapping from irqchip/pin to gsi Gleb Natapov
2009-08-12  8:09   ` Avi Kivity
2009-08-12  8:42     ` Gleb Natapov
2009-08-12  9:06       ` Avi Kivity
2009-08-12 10:17         ` Gleb Natapov
2009-08-12 10:19           ` Avi Kivity
2009-08-11 12:31 ` [PATCH 3/8 v2] Move irq routing data structure to rcu locking Gleb Natapov
2009-08-11 12:31 ` [PATCH 4/8 v2] Move irq ack notifier list to arch independent code Gleb Natapov
2009-08-11 12:31 ` [PATCH 5/8 v2] Convert irq notifiers lists to RCU locking Gleb Natapov
2009-08-11 12:31 ` [PATCH 6/8 v2] Move IO APIC to its own lock Gleb Natapov
2009-08-12  8:27   ` Avi Kivity
2009-08-12  9:04     ` Gleb Natapov
2009-08-12  9:18       ` Avi Kivity
2009-08-12  9:47         ` Gleb Natapov
2009-08-12  9:57           ` Avi Kivity
2009-08-12 10:05             ` Gleb Natapov
2009-08-12 10:07               ` Avi Kivity
2009-08-11 12:31 ` [PATCH 7/8 v2] Drop kvm->irq_lock lock from irq injection path Gleb Natapov
2009-08-11 12:31 ` [PATCH 8/8 v2] Change irq_lock from mutex to spinlock Gleb Natapov
2009-08-12  8:29   ` Avi Kivity
2009-08-12  9:11     ` Gleb Natapov
2009-08-12  9:22       ` Avi Kivity
2009-08-12  9:47         ` Gleb Natapov

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=20090812084114.GX4764@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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).