- convert spin lock to def lock
- reading always happen in single thread, remove lock protection
- rS FreeBSD src repository - subversion
No Test Coverage
- Build Status
Buildable 2358 Build 2374: arc lint + arc unit
So this is nit picking, but do yo need memory barriers here if you intend to peek? the lock ends up being effectively a memory barrier..
No. Since read/peek are happened in single thread, no mb is needed. Peek is just a normal read except it copies less data and doesn't advance the read position.
I just double checked the code. It is not MPSAFE to process the recv ring w/o lock, e.g. storvsc_poll(), which could be called in another thread. I think the spinlock -> default mtx change should be fine.
I think we could pass a flag down to the recv ring read/peek, so that we could do lockless read for other drivers.