Got rid of map.h. It's a leftover from the rmap code, and we use rlists.
Changed swapmap into swaplist.
This commit is contained in:
parent
6dabd3aad2
commit
35c10d2239
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3451
@ -34,12 +34,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.14 1994/10/02 07:19:43 rgrimes Exp $
|
||||
* $Id: genassym.c,v 1.15 1994/10/06 09:22:44 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
/* XXX This is just real ugly to have to do, but it is what you have to do! */
|
||||
#ifndef NFS
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.69 1994/10/02 17:29:51 phk Exp $
|
||||
* $Id: machdep.c,v 1.70 1994/10/04 18:44:21 ache Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -45,7 +45,6 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -34,12 +34,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.14 1994/10/02 07:19:43 rgrimes Exp $
|
||||
* $Id: genassym.c,v 1.15 1994/10/06 09:22:44 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
/* XXX This is just real ugly to have to do, but it is what you have to do! */
|
||||
#ifndef NFS
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.69 1994/10/02 17:29:51 phk Exp $
|
||||
* $Id: machdep.c,v 1.70 1994/10/04 18:44:21 ache Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -45,7 +45,6 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
# @(#)symbols.raw 7.6 (Berkeley) 5/8/91
|
||||
#
|
||||
# $Id$
|
||||
# $Id: symbols.raw,v 1.3 1994/05/25 08:55:13 rgrimes Exp $
|
||||
#
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#pstat
|
||||
# _cons
|
||||
_nswap
|
||||
_swapmap
|
||||
_swaplist
|
||||
#vmstat
|
||||
_cp_time
|
||||
# _rate
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
|
||||
* $Id: init_main.c,v 1.11 1994/09/25 19:33:33 phk Exp $
|
||||
* $Id: init_main.c,v 1.12 1994/10/02 04:45:45 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,6 @@
|
||||
#include <sys/exec.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
@ -36,13 +36,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
|
||||
* $Id: kern_exit.c,v 1.7 1994/09/25 19:33:37 phk Exp $
|
||||
* $Id: kern_exit.c,v 1.8 1994/10/02 17:35:14 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/tty.h>
|
||||
|
@ -36,12 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
||||
* $Id: kern_fork.c,v 1.6 1994/09/01 05:12:38 davidg Exp $
|
||||
* $Id: kern_fork.c,v 1.7 1994/10/02 04:45:47 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -31,13 +31,12 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
|
||||
* $Id: kern_malloc.c,v 1.3 1994/08/02 07:42:04 davidg Exp $
|
||||
* $Id: kern_malloc.c,v 1.4 1994/10/02 17:35:17 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
|
@ -31,12 +31,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_proc.c 8.4 (Berkeley) 1/4/94
|
||||
* $Id: kern_proc.c,v 1.6 1994/09/25 19:33:41 phk Exp $
|
||||
* $Id: kern_proc.c,v 1.7 1994/10/02 04:45:48 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -31,14 +31,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
|
||||
* $Id: uipc_mbuf.c,v 1.4 1994/10/02 17:35:31 phk Exp $
|
||||
* $Id: uipc_mbuf.c,v 1.5 1994/10/04 06:50:01 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/map.h>
|
||||
#define MBTYPES
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
|
||||
*
|
||||
* $Id: bpf.c,v 1.2 1994/08/02 07:45:51 davidg Exp $
|
||||
* $Id: bpf.c,v 1.3 1994/08/20 03:48:55 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "bpfilter.h"
|
||||
@ -58,7 +58,6 @@
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/map.h>
|
||||
|
||||
#include <sys/file.h>
|
||||
#if defined(sparc) && BSD < 199103
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
|
||||
* $Id: nfs_vnops.c,v 1.7 1994/09/22 19:38:28 wollman Exp $
|
||||
* $Id: nfs_vnops.c,v 1.8 1994/10/02 17:27:04 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,7 +52,6 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <sys/lockf.h>
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
|
||||
* $Id: nfs_vnops.c,v 1.7 1994/09/22 19:38:28 wollman Exp $
|
||||
* $Id: nfs_vnops.c,v 1.8 1994/10/02 17:27:04 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,7 +52,6 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <sys/lockf.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* rlist_alloc(&swapmap, 100, &loc); obtain 100 sectors from swap
|
||||
*
|
||||
* from: unknown?
|
||||
* $Id: rlist.h,v 1.5 1993/11/07 17:52:59 wollman Exp $
|
||||
* $Id: rlist.h,v 1.6 1993/11/25 01:38:01 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_RLIST_H_
|
||||
@ -29,13 +29,11 @@ struct rlist {
|
||||
struct rlist *rl_next; /* next list entry, if present */
|
||||
};
|
||||
|
||||
extern struct rlist *swaplist;
|
||||
|
||||
/* Functions to manipulate resource lists. */
|
||||
extern void rlist_free __P((struct rlist **, unsigned, unsigned));
|
||||
int rlist_alloc __P((struct rlist **, unsigned, unsigned *));
|
||||
extern void rlist_destroy __P((struct rlist **));
|
||||
|
||||
|
||||
/* heads of lists */
|
||||
extern struct rlist *swapmap;
|
||||
|
||||
#endif /* _SYS_RLIST_H_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mfs_vnops.c 8.3 (Berkeley) 9/21/93
|
||||
* $Id: mfs_vnops.c,v 1.5 1994/09/21 03:47:43 wollman Exp $
|
||||
* $Id: mfs_vnops.c,v 1.6 1994/09/25 22:31:08 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -40,7 +40,6 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
* $Id: swap_pager.c,v 1.9 1994/09/25 04:02:10 davidg Exp $
|
||||
* $Id: swap_pager.c,v 1.10 1994/10/09 01:52:04 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -79,6 +79,8 @@ extern int hz;
|
||||
int swap_pager_full;
|
||||
extern vm_map_t pager_map;
|
||||
extern int vm_swap_size;
|
||||
struct rlist *swaplist;
|
||||
int nswaplist;
|
||||
|
||||
#define MAX_PAGEOUT_CLUSTER 8
|
||||
|
||||
@ -364,14 +366,14 @@ swap_pager_getswapspace( unsigned amount, unsigned *rtval) {
|
||||
if( amount < nblocksfrag) {
|
||||
if( rlist_alloc(&swapfrag, amount, rtval))
|
||||
return 1;
|
||||
if( !rlist_alloc(&swapmap, nblocksfrag, &tmpalloc))
|
||||
if( !rlist_alloc(&swaplist, nblocksfrag, &tmpalloc))
|
||||
return 0;
|
||||
rlist_free( &swapfrag, tmpalloc+amount, tmpalloc + nblocksfrag - 1);
|
||||
*rtval = tmpalloc;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
if( !rlist_alloc(&swapmap, amount, rtval))
|
||||
if( !rlist_alloc(&swaplist, amount, rtval))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
@ -388,13 +390,13 @@ swap_pager_freeswapspace( unsigned from, unsigned to) {
|
||||
unsigned tmpalloc;
|
||||
if( ((to + 1) - from) >= nblocksfrag) {
|
||||
#endif
|
||||
rlist_free(&swapmap, from, to);
|
||||
rlist_free(&swaplist, from, to);
|
||||
#ifdef EXP
|
||||
return;
|
||||
}
|
||||
rlist_free(&swapfrag, from, to);
|
||||
while( rlist_alloc(&swapfrag, nblocksfrag, &tmpalloc)) {
|
||||
rlist_free(&swapmap, tmpalloc, tmpalloc + nblocksfrag-1);
|
||||
rlist_free(&swaplist, tmpalloc, tmpalloc + nblocksfrag-1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
|
||||
* $Id: vm_swap.c,v 1.6 1994/09/25 22:31:11 davidg Exp $
|
||||
* $Id: vm_swap.c,v 1.7 1994/10/09 01:52:18 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -42,8 +42,8 @@
|
||||
#include <sys/namei.h>
|
||||
#include <sys/dmap.h> /* XXX */
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/rlist.h>
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
@ -390,7 +390,7 @@ swfree(p, index)
|
||||
blk = niswap;
|
||||
for (swp = &swdevt[niswdev]; swp != sp; swp++)
|
||||
blk += swp->sw_nblks;
|
||||
rlist_free(&swapmap, blk, blk + nblks - 1);
|
||||
rlist_free(&swaplist, blk, blk + nblks - 1);
|
||||
vm_swap_size += nblks;
|
||||
return (0);
|
||||
}
|
||||
@ -409,7 +409,7 @@ swfree(p, index)
|
||||
blk = dmmax;
|
||||
/* XXX -- we need to exclude the first cluster as above */
|
||||
/* but for now, this will work fine... */
|
||||
rlist_free(&swapmap, vsbase, vsbase + blk - 1);
|
||||
rlist_free(&swaplist, vsbase, vsbase + blk - 1);
|
||||
vm_swap_size += blk;
|
||||
}
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user