Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2003 01:33:01 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Mark Santcroos <marks@ripe.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: nswap
Message-ID:  <20030121093301.GB6497@HAL9000.homeunix.com>
In-Reply-To: <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> <20030121074128.GA880@laptop.6bone.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Mark Santcroos <marks@ripe.net>:
> 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().

See swapoff(8), in particular the -a flag.

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?20030121093301.GB6497>