Date: Sun, 29 Aug 2021 08:26:37 GMT From: Ka Ho Ng <khng@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a58e222b3bcc - main - vfs: yield in vn_deallocate_impl() loop Message-ID: <202108290826.17T8QbZM059862@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=a58e222b3bcc5294ffbff88ff5f4c8d88b9dc324 commit a58e222b3bcc5294ffbff88ff5f4c8d88b9dc324 Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2021-08-29 08:26:00 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108290826.17T8QbZM059862>