Re: [Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()

2017-08-14 Thread Boris Ostrovsky
On 08/14/2017 10:42 AM, Julien Grall wrote: > > > On 14/08/17 15:39, Boris Ostrovsky wrote: >> +#define spin_lock_kick(l) \ +({ \to understand why you need a stronger one here +smp_mb();

Re: [Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()

2017-08-14 Thread Julien Grall
On 14/08/17 15:39, Boris Ostrovsky wrote: +#define spin_lock_kick(l) \ +({ \to understand why you need a stronger one here +smp_mb(); \ arch_lock_signal() has already a barrier for ARM.

Re: [Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()

2017-08-14 Thread Boris Ostrovsky
>> >> +#define spin_lock_kick(l) \ >> +({ \to understand why >> you need a stronger one here >> +smp_mb(); \ > > arch_lock_signal() has already a barrier for ARM. So we have a double > barrier

Re: [Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()

2017-08-14 Thread Julien Grall
Hi Boris, On 08/08/17 22:45, Boris Ostrovsky wrote: While waiting for a lock we may want to periodically run some code. This code may, for example, allow the caller to release resources held by it that are no longer needed in the critical section protected by the lock. Specifically, this featur

[Xen-devel] [PATCH v7 6/9] spinlock: Introduce spin_lock_cb()

2017-08-08 Thread Boris Ostrovsky
While waiting for a lock we may want to periodically run some code. This code may, for example, allow the caller to release resources held by it that are no longer needed in the critical section protected by the lock. Specifically, this feature will be needed by scrubbing code where the scrubber,