Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs * set winsize to memwinsize in init...
details: https://anonhg.NetBSD.org/src/rev/09a519234fa3
branches: trunk
changeset: 747969:09a519234fa3
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Oct 07 09:42:14 2009 +0000
description:
* 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
diffstat:
sys/rump/librump/rumpvfs/rumpblk.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 01779ed8000d -r 09a519234fa3 sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c Wed Oct 07 09:24:27 2009 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c Wed Oct 07 09:42:14 2009 +0000
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index