git: dc9b13736fce - main - Use maybe_yield() in a few more places
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Feb 2023 16:02:43 UTC
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc9b13736fce15ec3dc77a87e06d6406c92a0141
commit dc9b13736fce15ec3dc77a87e06d6406c92a0141
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2023-02-09 15:42:53 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-09 15:58:06 +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
---
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 008e646f2b7f..0b9d7ca9778f 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1247,8 +1247,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:
@@ -6719,8 +6718,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;
@@ -6935,8 +6933,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));
}