Module Name:    src
Committed By:   pooka
Date:           Wed Oct  7 09:42:14 UTC 2009

Modified Files:
        src/sys/rump/librump/rumpvfs: rumpblk.c

Log Message:
* set winsize to memwinsize in initial getwindow().  makes no functional
  difference, but looks less like a debug hack leftover.
* explain memory windows vs. directio a little better in comment


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/rump/librump/rumpvfs/rumpblk.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/rump/librump/rumpvfs/rumpblk.c
diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.28 src/sys/rump/librump/rumpvfs/rumpblk.c:1.29
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.28	Wed Oct  7 09:23:03 2009
+++ src/sys/rump/librump/rumpvfs/rumpblk.c	Wed Oct  7 09:42:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpblk.c,v 1.28 2009/10/07 09:23:03 pooka Exp $	*/
+/*	$NetBSD: rumpblk.c,v 1.29 2009/10/07 09:42:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -40,10 +40,19 @@
  * I/O operation.  It also gives finer-grained control of how to
  * flush data.  Additionally, in case the rump kernel dumps core,
  * we get way less carnage.
+ *
+ * However, it is quite costly in writing large amounts of
+ * file data, since old contents cannot merely be overwritten, but
+ * must be paged in first before replacing (i.e. r/m/w).  Ideally,
+ * we should use directio.  The problem is that directio can fail
+ * silently causing improper file system semantics (i.e. unflushed
+ * data).  Therefore, default to mmap for now.  Even so, directio
+ * _should_ be safe and can be enabled by compiling this module
+ * with -DHAS_DIRECTIO.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.28 2009/10/07 09:23:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.29 2009/10/07 09:42:14 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -448,7 +457,7 @@
 			 * make sure a) we can mmap at all b) we have the
 			 * necessary VA available
 			 */
-			winsize = 1;
+			winsize = memwinsize;
 			win = getwindow(rblk, off + i*memwinsize, &winsize,
 			    &error); 
 			if (win) {

Reply via email to