p l -tag -offset indent -width "UVM_ADV_SEQUENTIAL" -compact t UVM_ADV_NORMAL No hint t UVM_ADV_RANDOM Random access hint t UVM_ADV_SEQUENTIAL Sequential access hint (from lower offset to higher offset) .El
p The possible .Fa flags are
p l -tag -offset indent -width "UVM_ADV_SEQUENTIAL" -compact t UBC_READ Mapping will be accessed for read. t UBC_WRITE Mapping will be accessed for write. t UBC_FAULTBUSY Fault in window's pages already during mapping operation. Makes sense only for write. .El
p Once the mapping is created, it must be accessed only by methods that can handle faults, such as .Fn uiomove or .Fn kcopy . Page faults on the mapping will result in the object's pager method being called to resolve the fault.
p .Fn ubc_release frees the mapping at .Fa va for reuse. The mapping may be cached to speed future accesses to the same region of the object. The flags can be any of
p l -tag -offset indent -width "UVM_ADV_SEQUENTIAL" -compact t UBC_UNMAP Do not cache mapping. .El
p .Fn ubc_uiomove allocates an UBC memory window, performs I/O on it and unmaps the window. The .Fa advice parameter takes the same values as the respective parameter in .Fn ubc_alloc and the .Fa flags parameter takes the same arguments as .Fn ubc_alloc and .Fn ubc_release . Additionally, the flag .Dv UBC_PARTIALOK can be provided to indicate that it is acceptable to return if an error occurs mid-transfer. .Sh CODE REFERENCES The .Nm subsystem is implemented within the file
a sys/uvm/uvm_bio.c . .Sh SEE ALSO .Xr pmap 9 , .Xr uiomove 9 , .Xr uvm 9 , .Xr vnode 9 , .Xr vnodeops 9 .Rs .%A Chuck Silvers .%T "UBC: An Efficient Unified I/O and Memory Caching Subsystem for NetBSD" .%I USENIX Association .%B Proceedings of the FREENIX Track: 2000 USENIX Annual Technical Conference .%P 285-290 .%D June 18-23, 2000 .%U http://www.usenix.org/event/usenix2000/freenix/full_papers/silvers/silvers.pdf .Re .Sh HISTORY UBC first appeared in .Nx 1.6 . .Sh AUTHORS Chuck Silvers .Aq chuq (at] chuq.com designed and implemented the UBC part of UVM, which uses UVM pages to cache vnode data rather than the traditional buffer cache buffers.