Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2003 11:09:36 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Mark Santcroos <marks@ripe.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: nswap
Message-ID:  <20030120190936.GA3192@HAL9000.homeunix.com>
In-Reply-To: <20030120145205.GA4911@laptop.6bone.nl>
References:  <20030117000917.GA7277@laptop.6bone.nl> <20030117232729.GA5908@HAL9000.homeunix.com> <20030120145205.GA4911@laptop.6bone.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Mark Santcroos <marks@ripe.net>:
> On Fri, Jan 17, 2003 at 03:27:29PM -0800, David Schultz wrote:
> > Thus spake Mark Santcroos <marks@ripe.net>:
> > > in <sys/systm.h>:
> > > extern int nswap;   /* size of swap space */
> > > 
> > > in <vm/vm_swap.c>:
> > > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030120190936.GA3192>