Re: [Xen-devel] [PATCH v4 5/8] spinlock: Introduce spin_lock_cb()

2017-06-12 Thread Jan Beulich
>>> On 19.05.17 at 17:50, wrote: > @@ -140,6 +140,8 @@ void _spin_lock(spinlock_t *lock) > while ( tickets.tail != observe_head(&lock->tickets) ) > { > LOCK_PROFILE_BLOCK; > +if ( unlikely(cb) ) > +cb(data); The description says "periodically", which to me i

[Xen-devel] [PATCH v4 5/8] spinlock: Introduce spin_lock_cb()

2017-05-19 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,