Messages in this thread | | | Date | Thu, 11 Apr 2013 11:07:17 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH RFC 1/3] mutex: Make more scalable by doing less atomic operations |
| |
* Waiman Long <Waiman.Long@hp.com> wrote:
> BTW, I have also been thinking about extracting the spinlock out from the mutex > structure for some busy mutex by adding a pointer to an external auxiliary > structure (separately allocated at init time). The idea is to use the external > spinlock if available. Otherwise, the internal one will be used. That should > reduce cacheline contention for some of the busiest mutex. The spinner queuing > tickets can be in the external structure too. However, it requires a one line > change in each of the mutex initialization code. I haven't actually made the > code change and try it yet, but that is something that I am thinking of doing > when I have time.
I'm not sure per mutex allocations are a really good idea - we like our locking primitives to be simple, embeddable into data structures and allocatable together with the data structure with no other separate memory footprint.
Thanks,
Ingo
| |