Split PMD locks
Posted Sep 26, 2013 21:30 UTC (Thu) by
ncm (subscriber, #165)
Parent article:
Split PMD locks
A pointer in struct page to a mutex elsewhere makes the problem worse, unless there are many fewer mutexes than pages pointing to them.
Instead of a lock for each struct page, it should suffice to have a global, fixed-size table of mutexes, with the mutex for a particular page identified by hashing the page identifier. The mutex table just needs to be large compared to the number of CPUs, not the number of pages. Yes, sharing a mutex among multiple pages increases contention, but that can be tuned.
Growing struct page invites apocalypse.
(
Log in to post comments)