On Thu, 21 Jun 2007 10:31:53 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:This reminds me Nick's proposal of 'queued spinlocks' 3 months ago Maybe this should be re-considered ? (unlock is still a non atomic op, so we dont pay the serializing cost twice) http://lwn.net/Articles/227506/ extract : Implement queued spinlocks for i386. This shouldn't increase the size of the spinlock structure, while still able to handle 2^16 CPUs. The queued spinlock has 2 fields, a head and a tail, which are indexes into a FIFO of waiting CPUs. To take a spinlock, a CPU performs an "atomic_inc_return" on the head index, and keeps the returned value as a ticket. The CPU then spins until the tail index is equal to that ticket. To unlock a spinlock, the tail index is incremented (this can be non atomic, because only the lock owner will modify tail). Implementation inefficiencies aside, this change should have little effect on performance for uncontended locks, but will have quite a large cost for highly contended locks [O(N) cacheline transfers vs O(1) per lock aquisition, where N is the number of CPUs contending]. The benefit is is that contended locks will not cause any starvation. Just an idea. Big NUMA hardware seems to have fairness logic that prevents starvation for the regular spinlock logic. But it might be interesting for -rt kernel or systems with starvation issues. -
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andrew Morton | Re: CFD: linux-wanking@vger.kernel.org (was [PATCH] Standard indentation of argume... |
| Linus Torvalds | Linux 2.6.27-rc8 |
git: | |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Ingo Molnar | git-rerere observations and feature suggestions |
| Mike | Re: I don't want the .git directory next to my code. |
| Stephen Hemminger | git pull for update of netdev fails. |
| Leon Dippenaar | New tcp stack attack |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Shohrukh Shoyoqubov | Re: Site-to-site IPSec VPN between OpenBSD and Cisco PIX 515E |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Patrick McHardy | Re: Not understand some in htb_do_events function |
| David Miller | [GIT]: Networking |
| David Miller | Re: xfrm_state locking regression... |
