On Sat, Sep 20, 2025 at 4:42 PM David Laight david.laight.linux@gmail.com wrote:
On Wed, 17 Sep 2025 18:05:45 +0200 Mateusz Guzik mjguzik@gmail.com wrote:
I can agree the current state concerning ep_events_available() is avoidably error prone and something(tm) should be done. fwiw the refcount thing is almost free on amd64, I have no idea how this pans out on arm64.
Atomic operations are anything but free.... They are likely to be a similar cost to an uncontested spinlock entry.
In this context it was supposed to be s/refcount/seqcount/ and on amd64 that's loading the same var twice + a branch for the read thing. Not *free* but not in the same galaxy comped to acquiring a spinlock (even assuming it is uncontested).