diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2019-12-08 21:30:04 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2019-12-08 21:30:04 +0000 |
commit | abd80ddb9474948fb291becc395d72b40927a32b (patch) | |
tree | 5e32c99715a7ec2abcc89d4b8f76f07f0ad69bde /sys/fs/nfsserver/nfs_nfsdserv.c | |
parent | 791a24c7ea7d3ad41c703327d40e64d3ef6d02e2 (diff) | |
download | src-abd80ddb9474948fb291becc395d72b40927a32b.tar.gz src-abd80ddb9474948fb291becc395d72b40927a32b.zip |
vfs: introduce v_irflag and make v_type smaller
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 field with a new value: VIRF_DOOMED.
Reviewed by: kib, jeff
Differential Revision: https://reviews.freebsd.org/D22715
Notes
Notes:
svn path=/head/; revision=355537
Diffstat (limited to 'sys/fs/nfsserver/nfs_nfsdserv.c')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdserv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 3bfe8f6444fd..830fd23d6f1c 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -3024,7 +3024,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, } vp = dp; NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); - if ((vp->v_iflag & VI_DOOMED) == 0) + if (!VN_IS_DOOMED(vp)) nd->nd_repstat = nfsrv_opencheck(clientid, &stateid, stp, vp, nd, p, nd->nd_repstat); else |