Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern In case pagedaemon can't release a...



details:   https://anonhg.NetBSD.org/src/rev/4a486920a1ca
branches:  trunk
changeset: 338642:4a486920a1ca
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Jun 02 14:07:48 2015 +0000

description:
In case pagedaemon can't release any more memory, use kpause() instead
of cv_timedwait() on the pagedaemon condvar -- it's no use constantly
waking the pagedaemon up for new memory allocation attempts, as will
happen e.g. if new network connections are constantly pouring in.

diffstat:

 sys/rump/librump/rumpkern/vm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cca86356d43e -r 4a486920a1ca sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Tue Jun 02 14:06:16 2015 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Tue Jun 02 14:07:48 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.166 2015/04/18 15:49:18 pooka Exp $   */
+/*     $NetBSD: vm.c,v 1.167 2015/06/02 14:07:48 pooka Exp $   */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.166 2015/04/18 15:49:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.167 2015/06/02 14:07:48 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -1176,7 +1176,7 @@
                    uvmexp.paging == 0) {
                        rumpuser_dprintf("pagedaemoness: failed to reclaim "
                            "memory ... sleeping (deadlock?)\n");
-                       cv_timedwait(&pdaemoncv, &pdaemonmtx, hz);
+                       kpause("pddlk", false, hz, &pdaemonmtx);
                }
        }
 



Home | Main Index | Thread Index | Old Index