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 and the .Fa flags parameter is
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. t UBC_UNMAP Do not cache mapping. t UBC_PARTIALOK Indicate that it is acceptable to return if an error occurs mid-transfer. .El
p UBC memory window is a kernel mapping of .Fa uobj starting at offset .Fa offset .
p Once the mapping is created, it must be accessed only by methods that can handle faults, such as .Xr uiomove 9 or .Xr kcopy 9 . Page faults on the mapping will result in the object's pager method being called to resolve the fault.
p Size of individual UBC memory window is limited to .Va ubc_winsize . .Fn ubc_uiomove sequentially creates the UBC memory windows to eventually process the whole range according to .Fa offset and .Fa len parameters.
p The mappings may be cached to speed future accesses to the same region of the object, unless .Dv UBC_UNMAP was specified in .Fa flags parameter.
p .Fn ubc_zerorange sets a range of bytes in a UVM object to zero. The .Fa flags parameter takes the same arguments as .Fn ubc_uiomove .
p .Fn ubc_purge disassociates all UBC structures from an empty UVM object, specified by .Fa uobj . .Sh CODE REFERENCES The .Nm subsystem is implemented within the file
a sys/uvm/uvm_bio.c . .Sh SEE ALSO .Xr kcopy 9 , .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 .An Chuck Silvers .Aq Mt 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.