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

2017-04-18 Thread Boris Ostrovsky
On 04/18/2017 08:43 AM, Jan Beulich wrote: On 18.04.17 at 14:32, wrote: >> On 04/18/2017 02:49 AM, Jan Beulich wrote: >> On 13.04.17 at 18:55, wrote: On 04/13/2017 11:46 AM, Jan Beulich wrote: On 03.04.17 at 18:50, wrote: >> While waiting for a lock we may want to peri

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

2017-04-18 Thread Jan Beulich
>>> On 18.04.17 at 14:32, wrote: > On 04/18/2017 02:49 AM, Jan Beulich wrote: > On 13.04.17 at 18:55, wrote: >>> On 04/13/2017 11:46 AM, Jan Beulich wrote: >>> On 03.04.17 at 18:50, wrote: > While waiting for a lock we may want to periodically run some > code. We could use spin_t

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

2017-04-18 Thread Boris Ostrovsky
On 04/18/2017 02:49 AM, Jan Beulich wrote: On 13.04.17 at 18:55, wrote: >> On 04/13/2017 11:46 AM, Jan Beulich wrote: >> On 03.04.17 at 18:50, wrote: While waiting for a lock we may want to periodically run some code. We could use spin_trylock() but since it doesn't take lock >

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

2017-04-17 Thread Jan Beulich
>>> On 13.04.17 at 18:55, wrote: > On 04/13/2017 11:46 AM, Jan Beulich wrote: > On 03.04.17 at 18:50, wrote: >>> While waiting for a lock we may want to periodically run some >>> code. We could use spin_trylock() but since it doesn't take lock >>> ticket it may take a long time until the lock

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

2017-04-13 Thread Boris Ostrovsky
On 04/13/2017 11:46 AM, Jan Beulich wrote: On 03.04.17 at 18:50, wrote: >> While waiting for a lock we may want to periodically run some >> code. We could use spin_trylock() but since it doesn't take lock >> ticket it may take a long time until the lock is taken. >> >> Add spin_lock_cb() that

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

2017-04-13 Thread Jan Beulich
>>> On 03.04.17 at 18:50, wrote: > While waiting for a lock we may want to periodically run some > code. We could use spin_trylock() but since it doesn't take lock > ticket it may take a long time until the lock is taken. > > Add spin_lock_cb() that allows us to execute a callback while waiting.

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

2017-04-03 Thread Boris Ostrovsky
While waiting for a lock we may want to periodically run some code. We could use spin_trylock() but since it doesn't take lock ticket it may take a long time until the lock is taken. Add spin_lock_cb() that allows us to execute a callback while waiting. Also add spin_lock_kick() that will wake up