Module Name:    src
Committed By:   riastradh
Date:           Tue Sep 13 09:35:32 UTC 2022

Modified Files:
        src/sys/kern: vfs_mount.c

Log Message:
vflush(9): Insert `involuntary' preemption point at each vnode.

Currently there is a voluntary yield every 100ms, but that's a long
time.  Should help to avoid hogging the CPU while flushing lots of
data to big disks on systems without kpreemption.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/kern/vfs_mount.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.96 src/sys/kern/vfs_mount.c:1.97
--- src/sys/kern/vfs_mount.c:1.96	Fri Aug 26 11:03:53 2022
+++ src/sys/kern/vfs_mount.c	Tue Sep 13 09:35:31 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.96 2022/08/26 11:03:53 hannken Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.97 2022/09/13 09:35:31 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997-2020 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.96 2022/08/26 11:03:53 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.97 2022/09/13 09:35:31 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -549,6 +549,7 @@ vflushnext(struct vnode_iterator *marker
 		yield();
 		*when = getticks() + hz / 10;
 	}
+	preempt_point();
 	return vfs_vnode_iterator_next1(marker, NULL, NULL, true);
 }
 

Reply via email to