Thursday, December 19, 2013

pfs_lock.h and "atomics"

quilt series that tries to address the inefficiencies described in

1 comment:

Mikael Ronstrom said...

Hi Jonas,
I read through your patch serie:
Actually it does three things as I find:
1) Remove the unnecessary atomic loads in state changes (can't see that any of them was necessary even in old implementation) (Optimisation 1)
2) Replace atomic stores with a store and a write memory barrier (optimisation 2)
3) Fix a bug where version number isn't updated when we transition from allocated to dirty and back to allocated. Makes consistent reads possible to have read something weird (probably almost impossible to write a test case for this case).

One question:
Shouldn't the atomic store in set_allocated also be possible to replace with store + wmb()?

Also some spelling checker: now -> know, alreay -> already.