From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 12:46:38 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 352D416A4B3 for ; Sat, 25 Oct 2003 12:46:38 -0700 (PDT) Received: from VARK.homeunix.com (adsl-68-123-140-7.dsl.pltn13.pacbell.net [68.123.140.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A1FA43F85 for ; Sat, 25 Oct 2003 12:46:37 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.9/8.12.9) with ESMTP id h9PJkBen018446; Sat, 25 Oct 2003 12:46:11 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.9/8.12.9/Submit) id h9PJkAYw018445; Sat, 25 Oct 2003 12:46:10 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 25 Oct 2003 12:46:10 -0700 From: David Schultz To: Sean Hamilton Message-ID: <20031025194610.GB18230@VARK.homeunix.com> Mail-Followup-To: Sean Hamilton , freebsd-hackers@FreeBSD.ORG References: <005b01c398ed$87070080$0300000a@antalus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005b01c398ed$87070080$0300000a@antalus> cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Passthrough block device 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: Sat, 25 Oct 2003 19:46:38 -0000 On Wed, Oct 22, 2003, Sean Hamilton wrote: > Does FreeBSD support a device that will allow for the passing of all reads > and writes on it to a userland application? I wish to handle swapping > myself, preferably without any kernel hacking. > > What would happen if the kernel decided to swap out such a process? As far as I know, the only way to do that in FreeBSD is to implement a userland NFS server (e.g. amd(8)) on the local machine, have the kernel connect to localhost, and have your applications mmap() storage from that volume. (You probably won't be able to swap to the local NFS server without deadlocking.) People have implemented better solutions than that with some degree of OS support, however. Take a look at Mach's external pagers [1] and LRVM[2]. [1] http://citeseer.nj.nec.com/rashid87machineindependent.html [2] http://citeseer.nj.nec.com/satyanarayanan94lightweight.html