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] Make last processed event channel a p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Make last processed event channel a per-cpu variable.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Dec 2007 13:10:09 -0800
Delivery-date: Mon, 03 Dec 2007 13:10:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1196671812 0
# Node ID b2768401db943e66af9d64bd610ffa225f560c0b
# Parent  7fe1c6d02a2bd8d38b6a8b529f166990e4cd1dc3
Make last processed event channel a per-cpu variable.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 drivers/xen/core/evtchn.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff -r 7fe1c6d02a2b -r b2768401db94 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Fri Nov 30 14:35:31 2007 +0000
+++ b/drivers/xen/core/evtchn.c Mon Dec 03 08:50:12 2007 +0000
@@ -221,6 +221,8 @@ EXPORT_SYMBOL(force_evtchn_callback);
 EXPORT_SYMBOL(force_evtchn_callback);
 
 static DEFINE_PER_CPU(unsigned int, upcall_count) = { 0 };
+static DEFINE_PER_CPU(unsigned int, last_processed_l1i) = { BITS_PER_LONG - 1 
};
+static DEFINE_PER_CPU(unsigned int, last_processed_l2i) = { BITS_PER_LONG - 1 
};
 
 /* NB. Interrupts are disabled on entry. */
 asmlinkage void evtchn_do_upcall(struct pt_regs *regs)
@@ -228,7 +230,6 @@ asmlinkage void evtchn_do_upcall(struct 
        unsigned long       l1, l2;
        unsigned long       masked_l1, masked_l2;
        unsigned int        l1i, l2i, port, count;
-       static unsigned int last_processed_l1i = BITS_PER_LONG - 1, 
last_processed_l2i = BITS_PER_LONG - 1;
        int                 irq, cpu = smp_processor_id();
        shared_info_t      *s = HYPERVISOR_shared_info;
        vcpu_info_t        *vcpu_info = &s->vcpu_info[cpu];
@@ -248,8 +249,8 @@ asmlinkage void evtchn_do_upcall(struct 
 #endif
                l1 = xchg(&vcpu_info->evtchn_pending_sel, 0);
 
-               l1i = last_processed_l1i;
-               l2i = last_processed_l2i;
+               l1i = per_cpu(last_processed_l1i, cpu);
+               l2i = per_cpu(last_processed_l2i, cpu);
 
                while (l1 != 0) {
 
@@ -286,8 +287,8 @@ asmlinkage void evtchn_do_upcall(struct 
                                }
 
                                /* if this is the final port processed, we'll 
pick up here+1 next time */
-                               last_processed_l1i = l1i;
-                               last_processed_l2i = l2i;
+                               per_cpu(last_processed_l1i, cpu) = l1i;
+                               per_cpu(last_processed_l2i, cpu) = l2i;
 
                        } while (l2i != BITS_PER_LONG - 1);
 

_______________________________________________
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] Make last processed event channel a per-cpu variable., Xen patchbot-linux-2.6.18-xen <=