git: 6ddc7cdbc07c - stable/13 - Use maybe_yield() in a few more places
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Feb 2023 16:43:03 UTC
The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6ddc7cdbc07c6d14b88923d741adff6df113d7bc commit 6ddc7cdbc07c6d14b88923d741adff6df113d7bc Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-02-09 15:42:53 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-02-15 16:41:11 +0000 Use maybe_yield() in a few more places Reviewed by: kib, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38186 (cherry picked from commit dc9b13736fce15ec3dc77a87e06d6406c92a0141) --- sys/kern/vfs_subr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 81bad2da0f0c..67f707dd9edb 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1235,8 +1235,7 @@ restart: vn_finished_write(mp); done++; next_iter_unlocked: - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); mtx_lock(&vnode_list_mtx); goto restart; next_iter: @@ -6706,8 +6705,7 @@ __mnt_vnode_next_all(struct vnode **mvp, struct mount *mp) { struct vnode *vp; - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); MNT_ILOCK(mp); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); for (vp = TAILQ_NEXT(*mvp, v_nmntvnodes); vp != NULL; @@ -6922,8 +6920,7 @@ __mnt_vnode_next_lazy(struct vnode **mvp, struct mount *mp, mnt_lazy_cb_t *cb, void *cbarg) { - if (should_yield()) - kern_yield(PRI_USER); + maybe_yield(); mtx_lock(&mp->mnt_listmtx); return (mnt_vnode_next_lazy(mvp, mp, cb, cbarg)); }