mrkline / concurrency-primer

The basics of low-level concurrency in a sub-30 minute read
Other
176 stars 7 forks source link

Discussion of _false sharing_ could use a suggested alternative for reader-writer locks #5

Open david-bakin opened 6 years ago

david-bakin commented 6 years ago

Section 12 Cache effects and false sharing is an excellent addition to the paper as these issues are not often discussed yet can be important.

However, the discussion did leave me with one burning question: Since reader-writer locks can be a pessimism (per the discussion of cacheline sloshing) what is a recommended alternative if in fact you measure a performance slowdown at one of these locks? Switch to a different locking strategy, different lock struct layout, or what? (I'd really like to know ...)