The current vnode layout is not smp-friendly by having frequently read data avoidably sharing cachelines with very frequently modified fields. In particular v_iflag inspected for VI_DOOMED can be found in the same line with v_usecount. Instead make it available in the same cacheline as the v_op, v_data and v_type which all get read all the time.
v_type is avoidably 4 bytes while the necessary data will easily fit in 1. Shrinking it frees up 3 bytes, 2 of which get used here to introduce a new flag: VIRF_DOOMED.
The patch below is the material part of the change + some fix ups. Tree-wide sweep was generated with coccinelle and the combined patch can be found here:
https://people.freebsd.org/~mjg/vfs-v_irflag-complete.diff
With this out of the way + the lockmgr changes we will be able to do further reshuffling.