From owner-freebsd-arch Mon Oct 7 15: 7:10 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15BE937B401 for ; Mon, 7 Oct 2002 15:07:09 -0700 (PDT) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02D5143E7B for ; Mon, 7 Oct 2002 15:07:08 -0700 (PDT) (envelope-from wkb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.12.6/8.12.6) with ESMTP id g97M6uFr000617; Tue, 8 Oct 2002 00:06:57 +0200 (CEST) (envelope-from wkb@freebie.xs4all.nl) Received: (from wkb@localhost) by freebie.xs4all.nl (8.12.6/8.12.6/Submit) id g97M6uSv000616; Tue, 8 Oct 2002 00:06:56 +0200 (CEST) Date: Tue, 8 Oct 2002 00:06:56 +0200 From: Wilko Bulte To: Terry Lambert Cc: Peter Wemm , Mikhail Teterin , arch@FreeBSD.ORG Subject: Re: swapon some regular file Message-ID: <20021008000656.A598@freebie.xs4all.nl> References: <20021007212545.C363B2A88D@canning.wemm.org> <3DA204A7.50530BE5@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3DA204A7.50530BE5@mindspring.com>; from tlambert2@mindspring.com on Mon, Oct 07, 2002 at 03:03:19PM -0700 X-OS: FreeBSD 4.7-RC X-PGP: finger wilko@freebsd.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 07, 2002 at 03:03:19PM -0700, Terry Lambert wrote: > Peter Wemm wrote: > > > Users wishing to swap onto a local regular file have to go through the > > > vnconfig/mdconfig gimnastics. Is that intentional? > > > > Yes, it is quite intentional. swap_pager doesn't have the code to do > > logical to physical translation that file IO would require. And the > > VOP_BMAP calls that do that add new complications, including an additional > > place it can sleep or run out of memory. > > > > We can get away with it for swapping to a file over NFS because the remote > > server does the translation, not us. > > > > In reality, what is required is some careful cut/paste of code from > > vnode_pager to swap_pager to add the missing bits, and some care to deal > > with the complications. > > > > vnconfig/mdconfig work because that basically adds the logical -> physical > > translation step. I'd just as soon not have to mess with this though. > > It would be useful to be able to ask a file for its list of > physical blocks on the underlying device, so that you could > sort them into contiguous extents, and then use *those*, > instead of eating the translation overhead, each time... Sounds a bit like VMS (IIRC..) :) -- | / o / /_ _ wilko@FreeBSD.org |/|/ / / /( (_) Bulte Arnhem, the Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message