o Condition the compilation of uiomoveco() and vm_uiomove()

on ENABLE_VFS_IOOPT.
 o Add a comment to the effect that this code is experimental
   support for zero-copy I/O.
This commit is contained in:
Alan Cox 2002-05-05 22:42:40 +00:00
parent cae2a33cf0
commit c50fe92b8d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96080
4 changed files with 16 additions and 4 deletions

View file

@ -134,6 +134,10 @@ uiomove(cp, n, uio)
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
/*

View file

@ -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);

View file

@ -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

View file

@ -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_ */