From owner-freebsd-hackers Wed Feb 17 15:18:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from uni4nn.gn.iaf.nl (osmium.gn.iaf.nl [193.67.144.12]) by hub.freebsd.org (Postfix) with ESMTP id 60AE21131F; Wed, 17 Feb 1999 15:18:45 -0800 (PST) (envelope-from wilko@yedi.iaf.nl) Received: (from uucp@localhost) by uni4nn.gn.iaf.nl (8.9.2/8.9.2) with UUCP id AAA25948; Thu, 18 Feb 1999 00:04:16 +0100 (MET) Received: (from wilko@localhost) by yedi.iaf.nl (8.8.8/8.6.12) id TAA00897; Wed, 17 Feb 1999 19:36:35 +0100 (CET) From: Wilko Bulte Message-Id: <199902171836.TAA00897@yedi.iaf.nl> Subject: Re: savecore before swapon? In-Reply-To: <19990217142628.F69668@bitbox.follo.net> from Eivind Eklund at "Feb 17, 99 02:26:28 pm" To: eivind@freebsd.org (Eivind Eklund) Date: Wed, 17 Feb 1999 19:36:35 +0100 (CET) Cc: brandon@roguetrader.com, freebsd-hackers@freebsd.org X-Organisation: Private FreeBSD site - Arnhem, The Netherlands X-pgp-info: PGP public key at 'finger wilko@freefall.freebsd.org' X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG As Eivind Eklund wrote... > On Tue, Feb 16, 1999 at 08:26:00AM -0700, Brandon Gillespie wrote: > > I havn't checked the source, but from my understanding shouldn't > > savecore be run before swapon is run, incase the swap device is the > > dump device? Or to look at it another way, when swapon is run on a > > swap device, does it look first to see if there is a dump in it, and > > if so what does it do? Right now we run swapon, then considerably > > later we run savecore. Assuming swapon just trashes whatever was in > > that device, running savecore is pretty much irrelevant, as most > > people I know (not necessarily in FreeBSD) use their swap device as a > > dump point. > > This is done intentionally, as fsck may in some cases require swap > to be able to fsck large filesystems. > > It would make sense to have a sysctl > 'only_swap_as_absolutely_last_resort_not_for_performance' AKA > 'do_linux_swapping_scheme' which was set before the swapon, and unset > after the crashdump. I don't know how to implement this. (It might > be that one of the present sysctls does something like this - I've not > checked). Or start allocating swap 'backwards' from the high block# on the disk downwards. Assuming swap > physical mem and dumps starting at swap offset 0 this should be safe at all times (unless fsck really allocates all swap of course ;-) But this might be a lot of work, I'm not familiar with the VM. Wilko _ ______________________________________________________________________ | / o / / _ Arnhem, The Netherlands |/|/ / / /( (_) Bulte WWW : http://www.tcja.nl ______________________________________________ Powered by FreeBSD __________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message