[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 1/8] qspinlock: Introducing a 4-byte	queue spinlock	implementation
 
- To: Waiman Long <Waiman.Long@xxxxxx>
 
- From: Oleg Nesterov <oleg@xxxxxxxxxx>
 
- Date: Sun, 2 Mar 2014 14:31:40 +0100
 
- Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>,	Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>,	kvm@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>,	virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx,	Andi Kleen <andi@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>,	Michel Lespinasse <walken@xxxxxxxxxx>,	Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx,	Gleb Natapov <gleb@xxxxxxxxxx>, x86@xxxxxxxxxx,	Ingo Molnar <mingo@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx,	"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>,	Arnd Bergmann <arnd@xxxxxxxx>, Scott J Norton <scott.norton@xxxxxx>,	Rusty Russell <rusty@xxxxxxxxxxxxxxx>,	Steven Rostedt <rostedt@xxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>,	Alok Kataria <akataria@xxxxxxxxxx>,	Aswin Chandramouleeswaran <aswin@xxxxxx>, Chegu Vinod <chegu_vinod@xxxxxx>,	Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,	David Vrabel <david.vrabel@xxxxxxxxxx>,	Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,	Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
 
- Delivery-date: Sun, 02 Mar 2014 14:26:08 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
Forgot to ask...
On 02/26, Waiman Long wrote:
>
> +notify_next:
> +     /*
> +      * Wait, if needed, until the next one in queue set up the next field
> +      */
> +     while (!(next = ACCESS_ONCE(node->next)))
> +             arch_mutex_cpu_relax();
> +     /*
> +      * The next one in queue is now at the head
> +      */
> +     smp_store_release(&next->wait, false);
Do we really need smp_store_release()? It seems that we can rely on the
control dependency here. And afaics there is no need to serialise this
store with other changes in *lock, plus they all have mb's anyway.
Oleg.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
    
     |