Hi, > I landed on the idea of adding some intentional spinlock > contention to src/test/modules/test_shm_mq, which is a prefab test > framework for passing data among multiple worker processes. The > attached quick-hack patch makes it grab and release a spinlock once > per passed message.
I wonder if this will show the full set of spinlock contention issues - isn't this only causing contention for one spinlock between two processes? It's not too hard to imagine delays being more important the more processes contend for one cacheline. I only skimmed your changes, so I might also just have misunderstood what you were doing... Greetings, Andres Freund