From owner-freebsd-hackers Mon Jan 20 11: 9:40 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 CAA5D37B401 for ; Mon, 20 Jan 2003 11:09:38 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F2BE43F18 for ; Mon, 20 Jan 2003 11:09:38 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h0KJ9b0L003212; Mon, 20 Jan 2003 11:09:37 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h0KJ9aSw003211; Mon, 20 Jan 2003 11:09:36 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Mon, 20 Jan 2003 11:09:36 -0800 From: David Schultz To: Mark Santcroos Cc: hackers@FreeBSD.ORG Subject: Re: nswap Message-ID: <20030120190936.GA3192@HAL9000.homeunix.com> Mail-Followup-To: Mark Santcroos , hackers@FreeBSD.ORG References: <20030117000917.GA7277@laptop.6bone.nl> <20030117232729.GA5908@HAL9000.homeunix.com> <20030120145205.GA4911@laptop.6bone.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030120145205.GA4911@laptop.6bone.nl> 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 Thus spake Mark Santcroos : > On Fri, Jan 17, 2003 at 03:27:29PM -0800, David Schultz wrote: > > Thus spake Mark Santcroos : > > > in : > > > extern int nswap; /* size of swap space */ > > > > > > in : > > > static int nswap; /* first block after the interleaved devs */ > > > > > > Is the extern pointing to this variable? (It seems so, don't see any other > > > such variable in the three) > > > If so, is there any problem with making nswap non-static? > > > > It's a constant that is only relevant to the management of the > > swap allocation bitmap, so it is properly static. It shouldn't be > > declared in sys/systm.h. > > I need to get access to the swap interface. More precisely, I want to turn > it off. > > Either some of the values and functions need to be made global or the > interface should be changed. > > I need this for software suspending on which I am working. (Page in processes > and turn off swap devices before I write out the memory to it) > > Is it worth my time to produce patches that change the swapoff interface? 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message