Question on (ab)using the swap pager and VM

David Schultz das at FreeBSD.ORG
Thu May 22 03:51:26 PDT 2003


On Wed, May 21, 2003, Peter Edwards wrote:
> Hi All,
> As a programming exercise, I'm trying to write what is in essence
> a synthetic filesystem where the synthetic files contain large
> amounts of data I want to use a swap pager as a cached store for
> the data I'm providing. (ie, it'll be generated in the kernel)

Have you taken a look at md(4)?  This driver provides the
swap-backed functionality you want at the block device level where
it should be.  If you really want to duplicate the functionality,
though, take a look at how md(4) does it.  Specifically, look at
mdcreate_swap().


More information about the freebsd-hackers mailing list