[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)
Dan Magenheimer wrote: > Thanks Juergen. Do you know of any GPLv2 code that implements > this improved rwlock solution? (I don't think Linux does, > does it?) Good question. I just looked into the Linux code and decided not to analyse it. :-) I have implemented a solution for our BS2000 system on Xen. It is just a rather simple state machine using the cmpxchg instruction for the update of the (structured) lock word. If there is common interest for this solution I could prepare a patch. Juergen >> -----Original Message----- >> From: Juergen Gross [mailto:juergen.gross@xxxxxxxxxxxxxxxxxxx] >> Sent: Monday, March 30, 2009 12:12 AM >> To: Dan Magenheimer >> Cc: Keir Fraser; Jan Beulich; xen-devel@xxxxxxxxxxxxxxxxxxx >> Subject: Re: spinlock requests (was RE: [Xen-devel] [Patch] don't spin >> with irq disabled) >> >> if you are planning to use rw_locks you should be aware that >> the current >> implementation in Xen is sub-optimal on systems with high >> processor counts. >> Read locks always succeed when other readers are already >> holding the lock, >> even if a writer is waiting for the lock. If there are many >> potential readers >> they might (in theory) lock out a writer for rather long times. >> A better solution would be to stop further readers to acquire >> the lock if a >> writer is waiting for it. -- Juergen Gross Principal Developer IP SW OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Siemens Computers e-mail: juergen.gross@xxxxxxxxxxxxxxxxxxx Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |