Messages in this thread | | | Date | Thu, 29 Aug 2013 09:43:07 -0700 | Subject | Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount | From | Linus Torvalds <> |
| |
On Thu, Aug 29, 2013 at 12:00 AM, Ingo Molnar <mingo@kernel.org> wrote: > > Lockrefs are combiend spinlock+count objects that fit into a > MESI-cacheline and can be accessed via the cmpxchg8b() primitives and > allow smart combined operations on the count field without necessarily > taking the lock.
Side note: I'm going to finally build a new desktop, and made sure that I got a CPU that supports TSX. I'm not convinced transactional memory ends up being usable in general without hardware support for predicting transaction success, but using transactions to do small specialized things like this may well be worth it. Especially since the cmpxchg approach has some issues.
We'll see. The real problem is that I'm not sure if I can even see the scalability issue on any machine I actually personally want to use (read: silent). On my current system I can only get up to 15% _raw_spin_lock by just stat'ing the same file over and over and over again from lots of threads.
Linus
| |