[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



>>> On 03.04.17 at 18:50, <boris.ostrovsky@xxxxxxxxxx> 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.

You don't add any user(s) of this new interface and you also don't
outline under what conditions you think using this might be a good
idea. On that basis I don't think this makes much sense. I am
particularly worried of undue latencies use of this function may
incur.

> Also add spin_lock_kick() that will wake up the waiters.

Same here - I can't even seem to guess what use you intend this to
have.

Nevertheless the code itself looks okay.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.