Seqlock

The seqlocks were developed by Stephen Hemminger and originally called frlocks, based on earlier work by Andrea Arcangeli.

The first implementation was in the x86-64 time code where it was needed to synchronize with user space where it was not possible to use a real lock.

The lock is to support synchronization between two writers and the counter is for indicating consistency in readers.

If the sequence number is odd on either occasion, a writer had taken the lock while the data was being read and it may have changed.

The retry logic will trigger all the time because the debugger is slow enough to make the read race occur always.