Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern vrele_flush(): yield() every 100ms like we do it in...
details: https://anonhg.NetBSD.org/src/rev/5180c06e033c
branches: trunk
changeset: 1010208:5180c06e033c
user: hannken <hannken%NetBSD.org@localhost>
date: Mon May 18 08:27:54 2020 +0000
description:
vrele_flush(): yield() every 100ms like we do it in vflush().
diffstat:
sys/kern/vfs_vnode.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 35866f11d5c7 -r 5180c06e033c sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Mon May 18 05:47:54 2020 +0000
+++ b/sys/kern/vfs_vnode.c Mon May 18 08:27:54 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.121 2020/04/19 13:25:00 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.122 2020/05/18 08:27:54 hannken Exp $ */
/*-
* Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.121 2020/04/19 13:25:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.122 2020/05/18 08:27:54 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -534,6 +534,7 @@
{
vnode_impl_t *vip, *marker;
vnode_t *vp;
+ int when = 0;
KASSERT(fstrans_is_owner(mp));
@@ -561,6 +562,11 @@
mutex_enter(vp->v_interlock);
vrelel(vp, 0, LK_EXCLUSIVE);
+ if (getticks() > when) {
+ yield();
+ when = getticks() + hz / 10;
+ }
+
mutex_enter(&vdrain_lock);
}
Home |
Main Index |
Thread Index |
Old Index