The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=a58e222b3bcc5294ffbff88ff5f4c8d88b9dc324
commit a58e222b3bcc5294ffbff88ff5f4c8d88b9dc324 Author: Ka Ho Ng <[email protected]> AuthorDate: 2021-08-29 08:26:00 +0000 Commit: Ka Ho Ng <[email protected]> CommitDate: 2021-08-29 08:26:00 +0000 vfs: yield in vn_deallocate_impl() loop Yield at the end of each loop iteration if there are remaining works as indicated by the value of *len updated by VOP_DEALLOCATE. Without this, when calling vop_stddeallocate to zero a large region, the implementation only zerofills a relatively small chunk and returns. Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D31705 --- sys/kern/vfs_vnops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 3fce590519a8..bd512f73eae5 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3519,6 +3519,8 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, mp = NULL; } } + if (error == 0 && len != 0) + maybe_yield(); } out: if (rl_cookie != NULL) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
