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] [linux-2.6.18-xen] evtchn: Fix CPU offlining to switch a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] evtchn: Fix CPU offlining to switch all affected ports belonging to a
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 05 Jan 2009 11:50:15 -0800
Delivery-date: Mon, 05 Jan 2009 11:50:21 -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.fraser@xxxxxxxxxx>
# Date 1231154982 0
# Node ID 79e82ae1bad02c0dfb504db3153599e52a0affb3
# Parent  cfb171ddbb333df9671a1da62e40122a56213ab4
evtchn: Fix CPU offlining to switch all affected ports belonging to a
particular /dev/evcthn user.

Original patch by James Harper <james.harper@xxxxxxxxxxxxxxxx>

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 drivers/xen/evtchn/evtchn.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r cfb171ddbb33 -r 79e82ae1bad0 drivers/xen/evtchn/evtchn.c
--- a/drivers/xen/evtchn/evtchn.c       Mon Jan 05 10:54:36 2009 +0000
+++ b/drivers/xen/evtchn/evtchn.c       Mon Jan 05 11:29:42 2009 +0000
@@ -497,20 +497,22 @@ static int __cpuinit evtchn_cpu_notify(s
 {
        int hotcpu = (unsigned long)hcpu;
        cpumask_t map = cpu_online_map;
-       int port, newcpu;
+       int i, j, newcpu;
        struct per_user_data *u;
 
        switch (action) {
        case CPU_DOWN_PREPARE:
                cpu_clear(hotcpu, map);
                spin_lock_irq(&port_user_lock);
-               for (port = 0; port < NR_EVENT_CHANNELS; port++) {
-                       if ((u = port_user[port]) != NULL && 
-                           u->bind_cpu == hotcpu &&
-                           (newcpu = next_bind_cpu(map)) < NR_CPUS) {
-                               rebind_evtchn_to_cpu(port, newcpu);
-                               u->bind_cpu = newcpu;
-                       }
+               for (i = 0; i < NR_EVENT_CHANNELS; i++) {
+                       u = port_user[i];
+                       if ((u == NULL) || (u->bind_cpu != hotcpu))
+                               continue;
+                       newcpu = next_bind_cpu(map);
+                       for (j = i; j < NR_EVENT_CHANNELS; j++)
+                               if (port_user[j] == u)
+                                       rebind_evtchn_to_cpu(j, newcpu);
+                       u->bind_cpu = newcpu;
                }
                spin_unlock_irq(&port_user_lock);
                break;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] evtchn: Fix CPU offlining to switch all affected ports belonging to a, Xen patchbot-linux-2.6.18-xen <=