From owner-freebsd-hackers@FreeBSD.ORG Thu May 22 03:51:25 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D12F637B40A for ; Thu, 22 May 2003 03:51:25 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 938CE43F93 for ; Thu, 22 May 2003 03:51:22 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h4MApKXD001052; Thu, 22 May 2003 03:51:20 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h4MApJ1A001051; Thu, 22 May 2003 03:51:19 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 22 May 2003 03:51:19 -0700 From: David Schultz To: Peter Edwards Message-ID: <20030522105119.GB931@HAL9000.homeunix.com> Mail-Followup-To: Peter Edwards , hackers@freebsd.org References: <20030521180222.0FA3343F3F@mx1.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030521180222.0FA3343F3F@mx1.FreeBSD.org> cc: hackers@FreeBSD.ORG Subject: Re: Question on (ab)using the swap pager and VM X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 10:51:26 -0000 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().