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

Re: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq disabled)



On 27/03/2009 18:00, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

>> What try_readlock would that be? There is no such function.
> 
> Oops, my memory was faulty.  It is read_lock() itself
> that decrements the lock and then re-increments it.
> This appeared to be causing the race.  When I added
> debug code, the problem went away (which was what led
> me to the "hack" working version).

Well the race is still impossible afaics. Unless your
_raw_rw_is_write_locked() was checking for ==0 rather than <=0. I think
something fishy was going on in your actual original implementation if
is_write_locked(). :-)

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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