Re: [PATCH] arch/tile: fix rwlock so would-be write lockers don't block new readers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cypher Wu
Date: Monday, November 22, 2010 - 6:36 pm

2010/11/22 Chris Metcalf <cmetcalf@tilera.com>:

Say, if core A try to write_lock() rwlock and current_ticket_ is 0 and
it write next_ticket_ to 1, when it processing the lock, core B try to
write_lock() again and write next_ticket_ to 2, then when A
write_unlock() it seen that (current_ticket_+1) is not equal to
next_ticket_, so it increment current_ticket_, and core B get the
lock. If core A try write_lock again before core B write_unlock, it
will increment next_ticket_ to 3. And so on.
This may rarely happened, I've tested it yesterday for several hours
it goes very well under pressure.


-- 
Cyberman Wu
http://www.meganovo.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Thu Nov 11, 6:49 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Thu Nov 11, 8:23 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Thu Nov 11, 8:32 am)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Thu Nov 11, 8:32 pm)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Thu Nov 11, 11:28 pm)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 12:13 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Fri Nov 12, 12:27 am)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 1:19 am)
Re: Kernel rwlock design, Multicore and IGMP, Yong Zhang, (Fri Nov 12, 2:09 am)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 2:18 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Fri Nov 12, 2:22 am)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 2:33 am)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Fri Nov 12, 4:06 am)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Fri Nov 12, 4:10 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Fri Nov 12, 4:25 am)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 11:28 pm)
Re: Kernel rwlock design, Multicore and IGMP, Américo Wang, (Fri Nov 12, 11:35 pm)
Re: Kernel rwlock design, Multicore and IGMP, Peter Zijlstra, (Sat Nov 13, 3:52 pm)
Re: Kernel rwlock design, Multicore and IGMP, Peter Zijlstra, (Sat Nov 13, 3:53 pm)
Re: Kernel rwlock design, Multicore and IGMP, Peter Zijlstra, (Sat Nov 13, 3:54 pm)
Re: Kernel rwlock design, Multicore and IGMP, Chris Metcalf, (Sat Nov 13, 4:03 pm)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Mon Nov 15, 12:22 am)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Mon Nov 15, 4:18 am)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Mon Nov 15, 4:31 am)
Re: Kernel rwlock design, Multicore and IGMP, Cypher Wu, (Tue Nov 16, 6:30 pm)
Re: Kernel rwlock design, Multicore and IGMP, Eric Dumazet, (Tue Nov 16, 9:43 pm)
Re: [PATCH] arch/tile: fix rwlock so would-be write locker ..., Cypher Wu, (Mon Nov 22, 6:36 pm)