Re: [PATCH] Move irq routing data structure to rcu locking

2009-07-12 Thread Avi Kivity

On 07/09/2009 04:13 PM, Gleb Natapov wrote:

Change it from list to array to make RCU handling simpler.

Signed-off-by: Gleb Natapovg...@redhat.com
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index f54a0d3..12d8d2b 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -161,7 +161,8 @@ struct kvm {

struct mutex irq_lock;
  #ifdef CONFIG_HAVE_KVM_IRQCHIP
-   struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */
+   struct kvm_kernel_irq_routing_entry *irq_routing;
+   spinlock_t irq_routing_lock;
struct hlist_head mask_notifier_list;
  #endif
   


Why the new lock?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Move irq routing data structure to rcu locking

2009-07-12 Thread Gleb Natapov
On Sun, Jul 12, 2009 at 12:50:05PM +0300, Avi Kivity wrote:
 On 07/09/2009 04:13 PM, Gleb Natapov wrote:
 Change it from list to array to make RCU handling simpler.

 Signed-off-by: Gleb Natapovg...@redhat.com
 diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
 index f54a0d3..12d8d2b 100644
 --- a/include/linux/kvm_host.h
 +++ b/include/linux/kvm_host.h
 @@ -161,7 +161,8 @@ struct kvm {

  struct mutex irq_lock;
   #ifdef CONFIG_HAVE_KVM_IRQCHIP
 -struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */
 +struct kvm_kernel_irq_routing_entry *irq_routing;
 +spinlock_t irq_routing_lock;
  struct hlist_head mask_notifier_list;
   #endif


 Why the new lock?

Currently routing table is protected by irq_lock mutex, but irq_lock is
overused. It protects too much of unrelated things and it is not clear what
its real purpose in life. I want to rid of it completely.

--
Gleb.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Move irq routing data structure to rcu locking

2009-07-12 Thread Avi Kivity

On 07/12/2009 01:07 PM, Gleb Natapov wrote:

On Sun, Jul 12, 2009 at 12:50:05PM +0300, Avi Kivity wrote:
   

On 07/09/2009 04:13 PM, Gleb Natapov wrote:
 

Change it from list to array to make RCU handling simpler.

Signed-off-by: Gleb Natapovg...@redhat.com
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index f54a0d3..12d8d2b 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -161,7 +161,8 @@ struct kvm {

struct mutex irq_lock;
   #ifdef CONFIG_HAVE_KVM_IRQCHIP
-   struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */
+   struct kvm_kernel_irq_routing_entry *irq_routing;
+   spinlock_t irq_routing_lock;
struct hlist_head mask_notifier_list;
   #endif

   

Why the new lock?

 

Currently routing table is protected by irq_lock mutex, but irq_lock is
overused. It protects too much of unrelated things and it is not clear what
its real purpose in life. I want to rid of it completely.
   


Separate discussion/patch.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html