From owner-freebsd-hackers Tue Jan 21 0:41:28 2003 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 8F25937B401 for ; Tue, 21 Jan 2003 00:41:26 -0800 (PST) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id E372E43F3F for ; Tue, 21 Jan 2003 00:41:24 -0800 (PST) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id h0L8fNAq018746 for ; Tue, 21 Jan 2003 09:41:23 +0100 Received: (nullmailer pid 938 invoked by uid 1000); Tue, 21 Jan 2003 07:41:28 -0000 Date: Tue, 21 Jan 2003 08:41:28 +0100 From: Mark Santcroos To: hackers@FreeBSD.ORG Subject: Re: nswap Message-ID: <20030121074128.GA880@laptop.6bone.nl> References: <20030117000917.GA7277@laptop.6bone.nl> <20030117232729.GA5908@HAL9000.homeunix.com> <20030120145205.GA4911@laptop.6bone.nl> <20030120190936.GA3192@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030120190936.GA3192@HAL9000.homeunix.com> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jan 20, 2003 at 11:09:36AM -0800, David Schultz wrote: > What exactly do you need to change about the swapoff interface? > Unless you're trying to write a module, anything that's going to > be invasive into the swap subsystem's data structures probably > belongs in vm_swap.c. Yes, that is also what I meant. We now have a swapoff() system call that does all the work itself. My idea was to split that up: /* turn of swap device */ static int swapoff_one(struct swdevt *sp) { /* Do all things that we don't want to know about outside this function */ } /* turn off all swap devices */ int swapoff_all() { int index; struct swdevt *sp; for (sp = swdevt, index = 0; index < nswdev; index++, sp++) swapoff_one(sp); } So the swapoff() system call would call swapoff_one() and my code in kern/kern_swsuspend.c would call swapoff_all(). Mark -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message