Revisit SMP Locking of core data structures #1128

Open
opened 2024-02-20 20:23:51 +00:00 by vyzo · 0 comments
vyzo commented 2024-02-20 20:23:51 +00:00 (Migrated from github.com)

We have some core data structures in the runtime that are protected by spin locks.

The rationale for this is that they are virtually free (compared to mutexes) in UP, and workable in SMP as they tend to be fast but busy wasting power depending on contention. With low contention they are very performant, but with high contention they are power hungry.

This is an acceptable trade off for now, where SMP is still WIP, but when it's time for production we'll need a more coherent locking strategy. I would love to see some form of futex, so that we can avoid the overhead of full blown mutexes and still protect critical structures without using too much power.

We have some core data structures in the runtime that are protected by _spin_ locks. The rationale for this is that they are virtually free (compared to mutexes) in UP, and workable in SMP as they tend to be fast but busy wasting power depending on contention. With low contention they are very performant, but with high contention they are power hungry. This is an acceptable trade off for now, where SMP is still WIP, but when it's time for production we'll need a more coherent locking strategy. I would love to see some form of futex, so that we can avoid the overhead of full blown mutexes and still protect critical structures without using too much power.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil#1128
No description provided.