xen-devel
[Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for P
To: |
"Jeremy Fitzhardinge" <jeremy@xxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks |
From: |
"Jan Beulich" <JBeulich@xxxxxxxxxx> |
Date: |
Wed, 17 Nov 2010 08:11:24 +0000 |
Cc: |
Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>, Nick Piggin <npiggin@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>, Eric Dumazet <dada1@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Avi Kivity <avi@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, xiyou.wangcong@xxxxxxxxx, Linux Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx> |
Delivery-date: |
Wed, 17 Nov 2010 00:12:19 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<aa32da076143b8e13c23c1f589d7e6cbedb22907.1289940821.git.jeremy.fitzhardinge@xxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<cover.1289940821.git.jeremy.fitzhardinge@xxxxxxxxxx><cover.1289940821.git.jeremy.fitzhardinge@xxxxxxxxxx> <aa32da076143b8e13c23c1f589d7e6cbedb22907.1289940821.git.jeremy.fitzhardinge@xxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
>>> On 16.11.10 at 22:08, Jeremy Fitzhardinge <jeremy@xxxxxxxx> 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;
> + struct xen_lock_waiting *w = &__get_cpu_var(lock_waiting);
> + int cpu = smp_processor_id();
> u64 start;
>
> /* If kicker interrupts not initialized yet, just spin */
> if (irq == -1)
> - return 0;
> + return;
>
> start = spin_time_start();
>
> - /* announce we're spinning */
> - prev = spinning_lock(xl);
> + w->want = want;
> + w->lock = lock;
> +
> + /* This uses set_bit, which atomic and therefore a barrier */
> + cpumask_set_cpu(cpu, &waiting_cpus);
Since you don't allow nesting, don't you need to disable
interrupts before you touch per-CPU state?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 04/14] x86/ticketlock: make large and small ticket versions of spin_lock the same, (continued)
- [Xen-devel] [PATCH 04/14] x86/ticketlock: make large and small ticket versions of spin_lock the same, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 01/14] x86/ticketlock: clean up types and accessors, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 10/14] x86/pvticketlock: use callee-save for lock_spinning, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 06/14] x86/ticketlock: make __ticket_spin_trylock common, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 05/14] x86/ticketlock: make __ticket_spin_lock common, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 11/14] x86/ticketlock: don't inline _spin_unlock when using paravirt spinlocks, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 08/14] x86/ticketlock: collapse a layer of functions, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 14/14] x86/ticketlocks: tidy up __ticket_unlock_kick(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH 07/14] x86/spinlocks: replace pv spinlocks with pv ticketlocks, Jeremy Fitzhardinge
- [Xen-devel] [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks, Jeremy Fitzhardinge
- [Xen-devel] Re: [PATCH 09/14] xen/pvticketlock: Xen implementation for PV ticket locks,
Jan Beulich <=
[Xen-devel] [PATCH 12/14] x86/ticketlocks: when paravirtualizing ticket locks, increment by 2, Jeremy Fitzhardinge
[Xen-devel] [PATCH 13/14] x86/ticketlock: add slowpath logic, Jeremy Fitzhardinge
|
|
|