Re: [Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-17 Thread Jeremy Fitzhardinge
On 11/17/2010 02:34 AM, Jan Beulich wrote: >> Actually, on second thoughts, maybe it doesn't matter so much. The main >> issue is making sure that the interrupt will make the VCPU drop out of >> xen_poll_irq() - if it happens before xen_poll_irq(), it should leave >> the event pending, which will

Re: [Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-17 Thread Jan Beulich
>>> On 17.11.10 at 10:57, Jeremy Fitzhardinge wrote: > On 11/17/2010 12:52 AM, Jeremy Fitzhardinge wrote: >> On 11/17/2010 12:11 AM, Jan Beulich wrote: >> On 16.11.10 at 22:08, Jeremy Fitzhardinge wrote: +static void xen_lock_spinning(struct arch_spinlock *lock, unsigned want) { >>

Re: [Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-17 Thread Jeremy Fitzhardinge
On 11/17/2010 12:52 AM, Jeremy Fitzhardinge wrote: > On 11/17/2010 12:11 AM, Jan Beulich wrote: > On 16.11.10 at 22:08, Jeremy Fitzhardinge wrote: >>> +static void xen_lock_spinning(struct arch_spinlock *lock, unsigned want) >>> { >>> - struct xen_spinlock *xl = (struct xen_spinlock *)lock;

Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-17 Thread Jeremy Fitzhardinge
On 11/17/2010 12:11 AM, Jan Beulich wrote: On 16.11.10 at 22:08, Jeremy Fitzhardinge wrote: >> +static void xen_lock_spinning(struct arch_spinlock *lock, unsigned want) >> { >> -struct xen_spinlock *xl = (struct xen_spinlock *)lock; >> -struct xen_spinlock *prev; >> int irq = __

Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-17 Thread Jan Beulich
>>> On 16.11.10 at 22:08, Jeremy Fitzhardinge wrote: > +static void xen_lock_spinning(struct arch_spinlock *lock, unsigned want) > { > - struct xen_spinlock *xl = (struct xen_spinlock *)lock; > - struct xen_spinlock *prev; > int irq = __get_cpu_var(lock_kicker_irq); > - int ret;

[PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks

2010-11-16 Thread Jeremy Fitzhardinge
From: Jeremy Fitzhardinge Replace the old Xen implementation of PV spinlocks with and implementation of xen_lock_spinning and xen_unlock_kick. xen_lock_spinning simply registers the cpu in its entry in lock_waiting, adds itself to the waiting_cpus set, and blocks on an event channel until the ch