Add the MSFBUF API. MSFBUFs are like SFBUFs but they manage ephermal
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 5 Jun 2004 19:57:40 +0000 (19:57 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 5 Jun 2004 19:57:40 +0000 (19:57 +0000)
commitd6a46bb7c40983b9dc0aa256e0730c79872a41a2
tree1baedfdd613d7c85e7f7927e95f0cbd53fcec89e
parent6ddd9284f4c93a0e00db35f82d25dcd895a5a5ba
Add the MSFBUF API.  MSFBUFs are like SFBUFs but they manage ephermal
multi-page mappings instead of single-page mappings.  MSFBUFs have the
same caching and page invalidation optimizations that SFBUFs have and are
considered to be SMP-friendly.

Whereas XIO manages pure page lists, MSFBUFs manage KVA mappings of pure
page lists.

This initial commit just gets the basic API operational.  The roadmap for
future work includes things like better interactions with third-party XIOs,
mapping user buffers into the kernel (extending the xio_init_ubuf() API into
the MSFBUF API), and allowing higher level subsystems to pass previously
released MSFBUFs as a hint to speed-up regeneration.  We also need to come
up with a way to overload additional sets of MSFBUFs representing smaller
chunks of memory on top of the same KVA space in order to efficiently use
our KVA reservation when dealing with subsystems like the buffer cache.

MSFBUFs will eventually replace the KVA management in the BUF/BIO, PIPE,
and other subsystems which create fake linear mappings with pbufs.  The
general idea for BUF/BIO will be to use XIO and MSFBUFs to avoid KVA
mapping file data through the nominal I/O path.  XIO will be the primary I/O
buffer mechanism while MSFBUFs will be used when things like UFS decide they
need a temporary mapping.

This is a collaborative work between Hiten Pandya <hmp@leaf.dragonflybsd.org>
and Matthew Dillon <dillon@backplane.com>.
sys/conf/files
sys/kern/kern_msfbuf.c [new file with mode: 0644]
sys/kern/kern_xio.c
sys/sys/msfbuf.h [new file with mode: 0644]