News for hackers. Stuff that matters.
Re:Mutexes are faster than Spinlocks by jakemal on Saturday January 04, 2020 @01:26PM (#21956455)
What is a use case for optimizing interprocessor latency?
Re:Mutexes are faster than Spinlocks by anonymoushn on Saturday January 04, 2020 @02:07PM (#21956701)
Hello,

I wrote some software at an automated trading firm that would do the subset of "parsing ticks and maintaining order books" sufficient to map ticks to symbols, and no more work than that. My code was pinned to one core and spun waiting for an expensive network card to DMA some ticks into memory, then when ticks we cared about were found it would load them onto one or more queues. Each queue corresponded to a different thread spin waiting on its own pinned core.

So one use case is "transforming ticks into trading decisions slightly faster than you otherwise could"

Re:Mutexes are faster than Spinlocks by twic on Saturday January 04, 2020 @02:11PM (#21956718)
Comment-OP here - this is also more or less my use case.

Whether there is a use case for spinlocks outside low-latency trading, i have no idea!

Re:Mutexes are faster than Spinlocks by AstralStorm on Saturday January 04, 2020 @10:51PM (#21959511)
Software industrial process control, such as motors and let robotics. The longer latencies make the control loop less responsive or unstable. Microseconds granularity is very useful there.
Re:Mutexes are faster than Spinlocks by anonymoushn on Saturday January 04, 2020 @02:15PM (#21956748)
a friend of mine recently told me how Windows schedules cpu-bound threads to different cores to prevent thermal throttling, so I now wonder if we were mucking things up by running our CPUs too hot
Re:Mutexes are faster than Spinlocks by loeg on Saturday January 04, 2020 @02:50PM (#21956994)
If you weren't pegging thermal max you shouldn't be seeing thermal limiting. Although you're probably right that cooling is something software people are more likely overlook than SRE/hardware/lab folks.
Re:Mutexes are faster than Spinlocks by gpderetta on Saturday January 04, 2020 @04:08PM (#21957569)
Liquid cooling is not unheard of in the low latency trading world.
Re:Mutexes are faster than Spinlocks by kortilla on Saturday January 04, 2020 @05:45PM (#21958156)
High performance networking in general (NFV) frequently relies on cores dedicated to dpdk for the this.
Re:Mutexes are faster than Spinlocks by dfox on Saturday January 04, 2020 @05:58PM (#21958237)
Essentialy any true HPC workload. You can go pretty far by ignoring latency and doing some series of map and reduce stages on top of giant conceptual file with large-ish records. There are workloads where data for these partial parallel jobs are on the order of machine word or two and then you really care about communication latency between cores.
Re:Mutexes are faster than Spinlocks by brobinson on Saturday January 04, 2020 @02:31PM (#21956860)
Check out DPDK/VPP and the LMAX Disruptor paper.
Re:Mutexes are faster than Spinlocks by shitgoose on Saturday January 04, 2020 @04:12PM (#21957600)
And do not forget Chronicle Queue.
Re:Mutexes are faster than Spinlocks by lonelappde on Saturday January 04, 2020 @01:36PM (#21956518)
Finishing a high priority job sooner.
Re:Mutexes are faster than Spinlocks by monocasa on Saturday January 04, 2020 @02:02PM (#21956661)
Like TLB shootdown IPIs.