Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-06-02 00:35:02


Gavin Lambert wrote:
> On 2/06/2023 11:43, Peter Dimov wrote:
> > Gavin Lambert wrote:
> >> FWIW though, atomic_* on shared_ptr is entirely banned in my codebase
> >> precisely because of its spinlock implementation.
> >
> > Which part is wrong?
>
> Caused massive performance issues in my codebase. Not really a fault of
> your implementation per se (other than it's a spinlock at all), just a
> consequence of priority inversion plus too many collisions in the
> spinlock pool. Probably not something that would be a problem for most
> apps; I just have some special quirks.

Priority inversion shouldn't be an issue because the SmartPtr spinlock
now goes to sp_thread_sleep almost immediately (after just two tries.)

The spinlock pool size should probably be increased. 41 is only good for
about six cores and this isn't enough in 2023.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk