WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Allow assign_irq_vector to return an old

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Allow assign_irq_vector to return an old vector while moving an irq
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Nov 2010 06:25:11 -0800
Delivery-date: Sat, 27 Nov 2010 06:25:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1290766240 0
# Node ID 66df4f35b8deef7d23087c275dc517ce8412446e
# Parent  aee9a8f63aaefb1a3801eea2f7d9cddfeb5486df
Allow assign_irq_vector to return an old vector while moving an irq

The guest calls assign_irq_vector() to assign one if it doesn't have
one, and to find out the vector if it does have one.

If the cpu mask passed intersects with the existing mask, the old
vector is simply returned.

However, if the irq happens to be in transit at the time, this returns
EBUSY.  This is unnecessary if, as soon as the irq migration succeeds,
the logic would just return the old vector anyway.

This patch makes two changes:
* Switch the checks, so if the mask overlaps it always returns
* Return -EAGAIN instead of -EBUSY for moving irqs, to let the caller
know that the failure is temporary and may work if repeated.

This fixes a bug where on certain hardware, using the credit2
scheduler, a pvops kernel with multiple vcpus doesn't boot.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/arch/x86/irq.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r aee9a8f63aae -r 66df4f35b8de xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Nov 26 10:07:57 2010 +0000
+++ b/xen/arch/x86/irq.c        Fri Nov 26 10:10:40 2010 +0000
@@ -348,9 +348,6 @@ int __assign_irq_vector(int irq, struct 
     int cpu, err;
     cpumask_t tmp_mask;
 
-    if ((cfg->move_in_progress) || cfg->move_cleanup_count)
-        return -EBUSY;
-
     old_vector = irq_to_vector(irq);
     if (old_vector) {
         cpus_and(tmp_mask, mask, cpu_online_map);
@@ -360,6 +357,9 @@ int __assign_irq_vector(int irq, struct 
             return 0;
         }
     }
+
+    if ((cfg->move_in_progress) || cfg->move_cleanup_count)
+        return -EAGAIN;
 
     /* Only try and allocate irqs on cpus that are present */
     cpus_and(mask, mask, cpu_online_map);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Allow assign_irq_vector to return an old vector while moving an irq, Xen patchbot-unstable <=