User: Password:
|
|
Subscribe / Log in / New account

Improving ticket spinlocks

Improving ticket spinlocks

Posted Jan 4, 2013 22:06 UTC (Fri) by zlynx (subscriber, #2285)
Parent article: Improving ticket spinlocks

I wonder if you could use a profiling step to determine the ideal number of cycles to wait for each lock?

For example, record the cycle count when getting the lock and when releasing the lock, record the difference as N. The next lock spinner in line should ideally wait N+1 cycles before checking the lock.

Then on the next kernel build use those profile numbers and record them in each spinlock structure.

This would work perfectly if it weren't for the pesky problems of unexpected cache line misses, CPU interrupts and other interference.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds