[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] Make last processed event channel a per-cpu variable.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |