>>> Boris Ostrovsky <boris.ostrov...@oracle.com> 08/04/17 7:03 PM >>>
>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, while waiting for heap lock to merge back clean
>pages, may be requested by page allocator (which is currently
>holding the lock) to abort merging and release the buddy page head
>that the allocator wants.
>We could use spin_trylock() but since it doesn't take lock ticket
>it may take long time until the lock is taken. Instead we add
>spin_lock_cb() that allows us to grab the ticket and execute a
>callback while waiting. This callback is executed on every iteration
>of the spinlock waiting loop.
>Since we may be sleeping in the lock until it is released we need a
>mechanism that will make sure that the callback has a chance to run.
>We add spin_lock_kick() that will wake up the waiter.
>Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com>
As previously expressed I'm not overly happy with this, but I also can't
see any good alternative for the use of it in the following patch(es).
Short of any other REST maintainer having voiced any opinion (iirc),
Acked-by: Jan Beulich <jbeul...@suse.com>
Xen-devel mailing list