summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_subr.c10
-rw-r--r--sys/sys/uio.h2
-rw-r--r--sys/vm/vm_map.c4
-rw-r--r--sys/vm/vm_map.h4
4 files changed, 16 insertions, 4 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 9f2ede2..73aa75b 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -134,6 +134,10 @@ out:
return (error);
}
+#ifdef ENABLE_VFS_IOOPT
+/*
+ * Experimental support for zero-copy I/O
+ */
int
uiomoveco(cp, n, uio, obj)
caddr_t cp;
@@ -207,8 +211,9 @@ uiomoveco(cp, n, uio, obj)
return (0);
}
-#ifdef ENABLE_VFS_IOOPT
-
+/*
+ * Experimental support for zero-copy I/O
+ */
int
uioread(n, uio, obj, nread)
int n;
@@ -274,7 +279,6 @@ uioread(n, uio, obj, nread)
}
return error;
}
-
#endif
/*
diff --git a/sys/sys/uio.h b/sys/sys/uio.h
index e09ca3f..59e54f1 100644
--- a/sys/sys/uio.h
+++ b/sys/sys/uio.h
@@ -86,8 +86,10 @@ struct vm_object;
void uio_yield(void);
int uiomove(caddr_t, int, struct uio *);
+#ifdef ENABLE_VFS_IOOPT /* Experimental support for zero-copy I/O */
int uiomoveco(caddr_t, int, struct uio *, struct vm_object *);
int uioread(int, struct uio *, struct vm_object *, int *);
+#endif
int copyinfrom(const void *src, void *dst, size_t len, int seg);
int copyinstrfrom(const void *src, void *dst, size_t len,
size_t *copied, int seg);
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index b7f99096..cbf9b00 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2917,7 +2917,10 @@ vm_map_lookup_done(vm_map_t map, vm_map_entry_t entry)
vm_map_unlock_read(map);
}
+#ifdef ENABLE_VFS_IOOPT
/*
+ * Experimental support for zero-copy I/O
+ *
* Implement uiomove with VM operations. This handles (and collateral changes)
* support every combination of source object modification, and COW type
* operations.
@@ -3149,6 +3152,7 @@ vm_uiomove(
}
return 0;
}
+#endif
/*
* Performs the copy_on_write operations necessary to allow the virtual copies
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 8156682..0b87777 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -300,11 +300,13 @@ int vm_map_submap (vm_map_t, vm_offset_t, vm_offset_t, vm_map_t);
int vm_map_madvise (vm_map_t, vm_offset_t, vm_offset_t, int);
void vm_map_simplify_entry (vm_map_t, vm_map_entry_t);
void vm_init2 (void);
-int vm_uiomove (vm_map_t, vm_object_t, off_t, int, vm_offset_t, int *);
void vm_freeze_copyopts (vm_object_t, vm_pindex_t, vm_pindex_t);
int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int);
int vm_map_growstack (struct proc *p, vm_offset_t addr);
int vmspace_swap_count (struct vmspace *vmspace);
+#ifdef ENABLE_VFS_IOOPT /* Experimental support for zero-copy I/O */
+int vm_uiomove(vm_map_t, vm_object_t, off_t, int, vm_offset_t, int *);
+#endif
#endif /* _KERNEL */
#endif /* _VM_MAP_ */
OpenPOWER on IntegriCloud