https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281749
--- Comment #56 from Mateusz Guzik <[email protected]> --- The fence on lookup side is indeed needed, which is why I said I need atomic_fcmpset_seq_cst. I see I mistakenly stated vhold_smr as the consumer though. Just in case I'll note the bug only concerns lockless lookup as the locked variant always the vnode lock (even for !LOCKLEAF case) which already synchronizes it. For !LOCKLEAF relevant code in the lockless variant boils down to the following: seqc = vn_seqc_read_any(vp); vs = vget_prep_smr(vp); vget_finish_ref(vp); if (!vn_seqc_consistent(vp, seqc)) abort(); and indeed seq_cst is needed so that v_usecount bump is published before seqc is re-read. with atomic_fcmpset_seq_cst for v_usecount manipulation this will happen to come at no extra cost on amd64. -- You are receiving this mail because: You are the assignee for the bug.
