Add a knob to disable vn_io_fault.
MFC after: 1 month
This commit is contained in:
parent
bb2f52a61d
commit
bba080854d
@ -697,6 +697,9 @@ vn_write(fp, uio, active_cred, flags, td)
|
||||
}
|
||||
|
||||
static const int io_hold_cnt = 16;
|
||||
static int vn_io_fault_enable = 1;
|
||||
SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RW,
|
||||
&vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance");
|
||||
static unsigned long vn_io_faults_cnt;
|
||||
SYSCTL_LONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD,
|
||||
&vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers");
|
||||
@ -759,7 +762,8 @@ vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred,
|
||||
vp = fp->f_vnode;
|
||||
if (uio->uio_segflg != UIO_USERSPACE || vp->v_type != VREG ||
|
||||
((mp = vp->v_mount) != NULL &&
|
||||
(mp->mnt_kern_flag & MNTK_NO_IOPF) == 0))
|
||||
(mp->mnt_kern_flag & MNTK_NO_IOPF) == 0) ||
|
||||
!vn_io_fault_enable)
|
||||
return (doio(fp, uio, active_cred, flags, td));
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user