sys/rangelock.h: explicitly enumerate padding at the end of the structure struct vnode: assign v_rl.resv1 as v_v2flag vnode: move VIRF_KNOTE to v_v2flag
Details
Details
- Reviewers
markj
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
| sys/sys/vnode.h | ||
|---|---|---|
| 205 | I believe the intent was to group frequently-read fields in the same cacheline at the beginning of the struct, see commit abd80ddb94749. The placement of v_vrflag here doesn't seem to provide much overhead vs. simply adding a new v_vflag field. Though, I see there is no space left. Maybe this should just be v_vflag2. | |
Comment Actions
Ok, but this removes the benefit of adding VIRF_KNOTE in the first place. The idea behind my suggestion was to avoid accessing multiple cache lines in (almost) every VOP just to figure out whether some vnode kevent or inotify events need to be published.
Comment Actions
Well. i_flag/v_flag is still nearby.
But, I can propose moving v_type and v_state out of the head to v_rl, and reusing these two bytes for v_v2flag.