Page MenuHomeFreeBSD

VIRF_KNOTE->V2_KNOTE
Needs ReviewPublic

Authored by kib on Sat, May 9, 9:38 PM.
Tags
None
Referenced Files
F157148594: D56912.diff
Mon, May 18, 7:00 PM
Unknown Object (File)
Thu, May 14, 9:11 PM
Unknown Object (File)
Wed, May 13, 10:03 PM
Unknown Object (File)
Mon, May 11, 3:56 PM
Unknown Object (File)
Mon, May 11, 12:38 PM
Unknown Object (File)
Mon, May 11, 10:24 AM
Unknown Object (File)
Mon, May 11, 10:23 AM
Unknown Object (File)
Mon, May 11, 3:53 AM
Subscribers

Details

Reviewers
markj
Summary
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

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.

kib retitled this revision from VIRF_KNOTE->VVRF_KNOTE to VIRF_KNOTE->V2_KNOTE.
kib edited the summary of this revision. (Show Details)

v_v2flag

kib marked an inline comment as done.Sun, May 10, 6:02 PM

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.

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.

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.