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 Add a comment explaning why uvm_re...



details:   https://anonhg.NetBSD.org/src/rev/31d68d7ae3ce
branches:  trunk
changeset: 761257:31d68d7ae3ce
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Jan 22 13:13:46 2011 +0000

description:
Add a comment explaning why uvm_reclaim_hook is not currently
necessary for rump.

XXX: strictly speaking, the zfs implementation does not work
correctly since it just wakes up a thread instead of performing
the scan in the context of the pagedaemon

diffstat:

 sys/rump/librump/rumpkern/vm.c |  21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diffs (47 lines):

diff -r 190929ac9663 -r 31d68d7ae3ce sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Sat Jan 22 12:13:25 2011 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Sat Jan 22 13:13:46 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.107 2011/01/18 22:21:23 haad Exp $    */
+/*     $NetBSD: vm.c,v 1.108 2011/01/22 13:13:46 pooka Exp $   */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.107 2011/01/18 22:21:23 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.108 2011/01/22 13:13:46 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -342,19 +342,20 @@
        /* nada */
 }
 
+/*
+ * The uvm reclaim hook is not currently necessary because it is
+ * used only by ZFS and implements exactly the same functionality
+ * as the kva reclaim hook which we already run in the pagedaemon
+ * (rump vm does not have a concept of uvm_map(), so we cannot
+ * reclaim kva it when a mapping operation fails due to insufficient
+ * available kva).
+ */
 void
 uvm_reclaim_hook_add(struct uvm_reclaim_hook *hook_entry)
 {
 
-       /* nada */
 }
-
-void
-uvm_reclaim_hook_del(struct uvm_reclaim_hook *hook_entry)
-{
-
-       /* nada */
-}
+__strong_alias(uvm_reclaim_hook_del,uvm_reclaim_hook_add);
 
 /* where's your schmonz now? */
 #define PUNLIMIT(a)    \



Home | Main Index | Thread Index | Old Index