unified buffer cache
struct uio *uio
() allocates an UBC memory window,
performs I/O on it and unmaps the window. The
parameter is the access pattern hint,
which must be one of
- No hint
- Random access hint
- Sequential access hint (from lower offset to higher offset)
and the flags
- Mapping will be accessed for read.
- Mapping will be accessed for write.
- Fault in window's pages already during mapping operation. Makes sense only
- Do not cache mapping.
- Indicate that it is acceptable to return if an error occurs
UBC memory window is a kernel mapping of uobj
starting at offset offset
Once the mapping is created, it must be accessed only by methods that can handle
faults, such as
Page faults on the mapping will result in the object's pager method being
called to resolve the fault.
Size of individual UBC memory window is limited to
() sequentially creates the UBC
memory windows to eventually process the whole range according to
The mappings may be cached to speed future accesses to the same region of the
was specified in
() sets a range of bytes in a
UVM object to zero. The flags
the same arguments as
() disassociates all UBC structures
from an empty UVM object, specified by uobj
subsystem is implemented within the
UBC: An Efficient Unified I/O and Memory Caching Subsystem
for NetBSD, Proceedings of the FREENIX Track: 2000
USENIX Annual Technical Conference, USENIX Association,
285-290, June 18-23,
UBC first appeared in NetBSD 1.6
designed and implemented the UBC part of UVM, which uses UVM pages to cache
vnode data rather than the traditional buffer cache buffers.