summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-06-17 00:14:00 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-06-17 00:14:00 +0000
commitc51365090d32d88879756762d7720c7761a80060 (patch)
tree1afbce1527260334cc5ac18619dc785406c8e968 /sys/uvm
parenta7fde65d2a4b3c80a105c722fceb4aead6a7b6e6 (diff)
date based reversion of uvm to the 4th May.
More backouts in line with previous ones, this appears to bring us back to a stable condition. A machine forced to 64mb of ram cycled 10GB through swap with this diff and is still running as I type this. Other tests by ariane@ and thib@ also seem to show that it's alright. ok deraadt@, thib@, ariane@
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_km.c2
-rw-r--r--sys/uvm/uvm_loan.c8
-rw-r--r--sys/uvm/uvm_map.c2
-rw-r--r--sys/uvm/uvm_meter.c6
-rw-r--r--sys/uvm/uvm_mmap.c2
-rw-r--r--sys/uvm/uvm_object.h2
-rw-r--r--sys/uvm/uvm_page.c12
-rw-r--r--sys/uvm/uvm_page.h2
-rw-r--r--sys/uvm/uvm_pager.c4
-rw-r--r--sys/uvm/uvm_pager.h2
-rw-r--r--sys/uvm/uvm_pdaemon.c22
-rw-r--r--sys/uvm/uvm_pglist.c6
-rw-r--r--sys/uvm/uvm_stat.c6
-rw-r--r--sys/uvm/uvm_swap.c67
-rw-r--r--sys/uvm/uvm_unix.c6
-rw-r--r--sys/uvm/uvm_vnode.c2
16 files changed, 72 insertions, 79 deletions
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 962b41bfac1..e6843631968 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.72 2009/06/16 17:14:15 oga Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.73 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c
index 756ffb7c2ca..caa6284f1fa 100644
--- a/sys/uvm/uvm_loan.c
+++ b/sys/uvm/uvm_loan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_loan.c,v 1.32 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_loan.c,v 1.33 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */
/*
@@ -105,12 +105,12 @@
* local prototypes
*/
-int uvm_loananon(struct uvm_faultinfo *, void ***,
+static int uvm_loananon(struct uvm_faultinfo *, void ***,
int, struct vm_anon *);
static int uvm_loanentry(struct uvm_faultinfo *, void ***, int);
-int uvm_loanuobj(struct uvm_faultinfo *, void ***,
+static int uvm_loanuobj(struct uvm_faultinfo *, void ***,
int, vaddr_t);
-int uvm_loanzero(struct uvm_faultinfo *, void ***, int);
+static int uvm_loanzero(struct uvm_faultinfo *, void ***, int);
/*
* inlines
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index b82f161aa9f..9c24fc7ee0a 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.117 2009/06/16 16:42:41 ariane Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.118 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
diff --git a/sys/uvm/uvm_meter.c b/sys/uvm/uvm_meter.c
index 60c9dbf9362..689ea32b610 100644
--- a/sys/uvm/uvm_meter.c
+++ b/sys/uvm/uvm_meter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_meter.c,v 1.27 2009/05/08 13:50:15 ariane Exp $ */
+/* $OpenBSD: uvm_meter.c,v 1.28 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_meter.c,v 1.21 2001/07/14 06:36:03 matt Exp $ */
/*
@@ -76,7 +76,7 @@ static fixpt_t cexp[3] = {
* prototypes
*/
-void uvm_loadav(struct loadavg *);
+static void uvm_loadav(struct loadavg *);
/*
* uvm_meter: calculate load average and wake up the swapper (if needed)
@@ -94,7 +94,7 @@ uvm_meter(void)
* uvm_loadav: compute a tenex style load average of a quantity on
* 1, 5, and 15 minute intervals.
*/
-void
+static void
uvm_loadav(struct loadavg *avg)
{
CPU_INFO_ITERATOR cii;
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index 9d13fc011af..12ff4569aa3 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.75 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.76 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
diff --git a/sys/uvm/uvm_object.h b/sys/uvm/uvm_object.h
index 3d5a091f462..44a16bfd7c1 100644
--- a/sys/uvm/uvm_object.h
+++ b/sys/uvm/uvm_object.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_object.h,v 1.13 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_object.h,v 1.14 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_object.h,v 1.11 2001/03/09 01:02:12 chs Exp $ */
/*
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index afd841ff331..1c6e60df7cf 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.90 2009/06/16 16:42:41 ariane Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.91 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -195,7 +195,7 @@ uvm_pageremove(struct vm_page *pg)
/* object should be locked */
TAILQ_REMOVE(&pg->uobject->memq, pg, listq);
- atomic_clearbits_int(&pg->pg_flags, PG_TABLED|PQ_AOBJ);
+ atomic_clearbits_int(&pg->pg_flags, PG_TABLED);
pg->uobject->uo_npages--;
pg->uobject = NULL;
pg->pg_version++;
@@ -483,9 +483,9 @@ uvm_pageboot_alloc(vsize_t size)
*/
/* subroutine: try to allocate from memory chunks on the specified freelist */
-boolean_t uvm_page_physget_freelist(paddr_t *, int);
+static boolean_t uvm_page_physget_freelist(paddr_t *, int);
-boolean_t
+static boolean_t
uvm_page_physget_freelist(paddr_t *paddrp, int freelist)
{
int lcv, x;
@@ -911,7 +911,7 @@ uvm_pagealloc_strat(struct uvm_object *obj, voff_t off, struct vm_anon *anon,
if ((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freemin ||
((uvmexp.free - BUFPAGES_DEFICIT) < uvmexp.freetarg &&
uvmexp.inactive < uvmexp.inactarg))
- wakeup(&uvm.pagedaemon_proc);
+ wakeup(&uvm.pagedaemon);
/*
* fail if any of these conditions is true:
@@ -1186,9 +1186,7 @@ uvm_pagefree(struct vm_page *pg)
uvmexp.wired--;
}
if (pg->uanon) {
- atomic_clearbits_int(&pg->pg_flags, PQ_ANON);
pg->uanon->an_page = NULL;
- pg->uanon = NULL;
#ifdef UBC
uvm_pgcnt_anon--;
#endif
diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h
index 4da52e8e323..366535db35c 100644
--- a/sys/uvm/uvm_page.h
+++ b/sys/uvm/uvm_page.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.h,v 1.38 2009/06/16 16:42:41 ariane Exp $ */
+/* $OpenBSD: uvm_page.h,v 1.39 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_page.h,v 1.19 2000/12/28 08:24:55 chs Exp $ */
/*
diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c
index 4aad8ee3738..38cbd7701bc 100644
--- a/sys/uvm/uvm_pager.c
+++ b/sys/uvm/uvm_pager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pager.c,v 1.52 2009/06/16 17:14:15 oga Exp $ */
+/* $OpenBSD: uvm_pager.c,v 1.53 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */
/*
@@ -856,7 +856,7 @@ uvm_aio_biodone(struct buf *bp)
mtx_enter(&uvm.aiodoned_lock); /* locks uvm.aio_done */
TAILQ_INSERT_TAIL(&uvm.aio_done, bp, b_freelist);
- wakeup(&uvm.aiodoned_proc);
+ wakeup(&uvm.aiodoned);
mtx_leave(&uvm.aiodoned_lock);
}
diff --git a/sys/uvm/uvm_pager.h b/sys/uvm/uvm_pager.h
index 8f720d4ccec..fea487b7863 100644
--- a/sys/uvm/uvm_pager.h
+++ b/sys/uvm/uvm_pager.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pager.h,v 1.25 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_pager.h,v 1.26 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_pager.h,v 1.20 2000/11/27 08:40:05 chs Exp $ */
/*
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index 27cdc07ae73..d62b66f5999 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pdaemon.c,v 1.49 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_pdaemon.c,v 1.50 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */
/*
@@ -96,9 +96,9 @@
* local prototypes
*/
-void uvmpd_scan(void);
-boolean_t uvmpd_scan_inactive(struct pglist *);
-void uvmpd_tune(void);
+static void uvmpd_scan(void);
+static boolean_t uvmpd_scan_inactive(struct pglist *);
+static void uvmpd_tune(void);
/*
* uvm_wait: wait (sleep) for the page daemon to free some pages
@@ -143,7 +143,7 @@ uvm_wait(const char *wmsg)
}
uvm_lock_fpageq();
- wakeup(&uvm.pagedaemon_proc); /* wake the daemon! */
+ wakeup(&uvm.pagedaemon); /* wake the daemon! */
msleep(&uvmexp.free, &uvm.fpageqlock, PVM | PNORELOCK, wmsg, timo);
}
@@ -155,7 +155,7 @@ uvm_wait(const char *wmsg)
* => caller must call with page queues locked
*/
-void
+static void
uvmpd_tune(void)
{
UVMHIST_FUNC("uvmpd_tune"); UVMHIST_CALLED(pdhist);
@@ -214,7 +214,7 @@ uvm_pageout(void *arg)
for (;;) {
uvm_lock_fpageq();
UVMHIST_LOG(pdhist," <<SLEEPING>>",0,0,0,0);
- msleep(&uvm.pagedaemon_proc, &uvm.fpageqlock, PVM | PNORELOCK,
+ msleep(&uvm.pagedaemon, &uvm.fpageqlock, PVM | PNORELOCK,
"pgdaemon", 0);
uvmexp.pdwoke++;
UVMHIST_LOG(pdhist," <<WOKE UP>>",0,0,0,0);
@@ -288,7 +288,7 @@ uvm_aiodone_daemon(void *arg)
*/
mtx_enter(&uvm.aiodoned_lock);
while ((bp = TAILQ_FIRST(&uvm.aio_done)) == NULL)
- msleep(&uvm.aiodoned_proc, &uvm.aiodoned_lock,
+ msleep(&uvm.aiodoned, &uvm.aiodoned_lock,
PVM, "aiodoned", 0);
/* Take the list for ourselves. */
TAILQ_INIT(&uvm.aio_done);
@@ -310,8 +310,8 @@ uvm_aiodone_daemon(void *arg)
bp = nbp;
}
uvm_lock_fpageq();
- wakeup(free <= uvmexp.reserve_kernel ?
- (void *)&uvm.pagedaemon_proc : (void *)&uvmexp.free);
+ wakeup(free <= uvmexp.reserve_kernel ? &uvm.pagedaemon :
+ &uvmexp.free);
uvm_unlock_fpageq();
}
}
@@ -328,7 +328,7 @@ uvm_aiodone_daemon(void *arg)
* => we return TRUE if we are exiting because we met our target
*/
-boolean_t
+static boolean_t
uvmpd_scan_inactive(struct pglist *pglst)
{
boolean_t retval = FALSE; /* assume we haven't hit target */
diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c
index 5abe87d9fb5..86234aef72e 100644
--- a/sys/uvm/uvm_pglist.c
+++ b/sys/uvm/uvm_pglist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pglist.c,v 1.31 2009/06/16 16:42:41 ariane Exp $ */
+/* $OpenBSD: uvm_pglist.c,v 1.32 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $ */
/*-
@@ -151,7 +151,7 @@ out:
if (!error && (uvmexp.free + uvmexp.paging < uvmexp.freemin ||
(uvmexp.free + uvmexp.paging < uvmexp.freetarg &&
uvmexp.inactive < uvmexp.inactarg))) {
- wakeup(&uvm.pagedaemon_proc);
+ wakeup(&uvm.pagedaemon);
}
uvm_unlock_fpageq();
@@ -358,7 +358,7 @@ out:
if (uvmexp.free + uvmexp.paging < uvmexp.freemin ||
(uvmexp.free + uvmexp.paging < uvmexp.freetarg &&
uvmexp.inactive < uvmexp.inactarg)) {
- wakeup(&uvm.pagedaemon_proc);
+ wakeup(&uvm.pagedaemon);
}
uvm_unlock_fpageq();
diff --git a/sys/uvm/uvm_stat.c b/sys/uvm/uvm_stat.c
index 8593f60d4d5..141bb371e9c 100644
--- a/sys/uvm/uvm_stat.c
+++ b/sys/uvm/uvm_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_stat.c,v 1.21 2009/05/08 13:50:15 ariane Exp $ */
+/* $OpenBSD: uvm_stat.c,v 1.22 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_stat.c,v 1.18 2001/03/09 01:02:13 chs Exp $ */
/*
@@ -68,7 +68,7 @@ int uvmhist_print_enabled = 1;
#ifdef UVMHIST
void uvmhist_dump(struct uvm_history *);
void uvm_hist(u_int32_t);
-void uvmhist_dump_histories(struct uvm_history *[]);
+static void uvmhist_dump_histories(struct uvm_history *[]);
#endif
void uvmcnt_dump(void);
@@ -93,7 +93,7 @@ uvmhist_dump(struct uvm_history *l)
/*
* print a merged list of uvm_history structures
*/
-void
+static void
uvmhist_dump_histories(struct uvm_history *hists[])
{
struct timeval tv;
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index f6a78511a70..0d1e94c2750 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.91 2009/06/16 00:11:29 oga Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.92 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
@@ -138,8 +138,7 @@ struct swapdev {
int swd_bsize; /* blocksize (bytes) */
int swd_maxactive; /* max active i/o reqs */
- int swd_active; /* i/o reqs in progress */
- struct bufq *swd_bufq; /* buffer queue */
+ struct buf swd_tab; /* buffer list */
struct ucred *swd_cred; /* cred for file access */
#ifdef UVM_SWAP_ENCRYPT
#define SWD_KEY_SHIFT 7 /* One key per 0.5 MByte */
@@ -230,23 +229,24 @@ struct rwlock swap_syscall_lock = RWLOCK_INITIALIZER("swplk");
/*
* prototypes
*/
-void swapdrum_add(struct swapdev *, int);
-struct swapdev *swapdrum_getsdp(int);
+static void swapdrum_add(struct swapdev *, int);
+static struct swapdev *swapdrum_getsdp(int);
-struct swapdev *swaplist_find(struct vnode *, int);
-void swaplist_insert(struct swapdev *, struct swappri *, int);
-void swaplist_trim(void);
+static struct swapdev *swaplist_find(struct vnode *, int);
+static void swaplist_insert(struct swapdev *,
+ struct swappri *, int);
+static void swaplist_trim(void);
-int swap_on(struct proc *, struct swapdev *);
-int swap_off(struct proc *, struct swapdev *);
+static int swap_on(struct proc *, struct swapdev *);
+static int swap_off(struct proc *, struct swapdev *);
-void sw_reg_strategy(struct swapdev *, struct buf *, int);
-void sw_reg_iodone(struct buf *);
-void sw_reg_start(struct swapdev *);
+static void sw_reg_strategy(struct swapdev *, struct buf *, int);
+static void sw_reg_iodone(struct buf *);
+static void sw_reg_start(struct swapdev *);
-int uvm_swap_io(struct vm_page **, int, int, int);
+static int uvm_swap_io(struct vm_page **, int, int, int);
-void swapmount(void);
+static void swapmount(void);
#ifdef UVM_SWAP_ENCRYPT
/* for swap encrypt */
@@ -476,7 +476,7 @@ uvm_swap_finicrypt_all(void)
* FREE it if we don't need it... this it to prevent malloc blocking
* here while adding swap)
*/
-void
+static void
swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority)
{
struct swappri *spp, *pspp;
@@ -528,7 +528,7 @@ swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority)
* => caller must hold both swap_syscall_lock and uvm.swap_data_lock
* => we return the swapdev we found (and removed)
*/
-struct swapdev *
+static struct swapdev *
swaplist_find(struct vnode *vp, boolean_t remove)
{
struct swapdev *sdp;
@@ -561,7 +561,7 @@ swaplist_find(struct vnode *vp, boolean_t remove)
*
* => caller must hold both swap_syscall_lock and uvm.swap_data_lock
*/
-void
+static void
swaplist_trim(void)
{
struct swappri *spp, *nextspp;
@@ -582,7 +582,7 @@ swaplist_trim(void)
* => caller must hold swap_syscall_lock
* => uvm.swap_data_lock should be unlocked (we may sleep)
*/
-void
+static void
swapdrum_add(struct swapdev *sdp, int npages)
{
u_long result;
@@ -602,7 +602,7 @@ swapdrum_add(struct swapdev *sdp, int npages)
* => each swapdev takes one big contig chunk of the drum
* => caller must hold uvm.swap_data_lock
*/
-struct swapdev *
+static struct swapdev *
swapdrum_getsdp(int pgno)
{
struct swapdev *sdp;
@@ -803,7 +803,6 @@ sys_swapctl(struct proc *p, void *v, register_t *retval)
sdp->swd_flags = SWF_FAKE; /* placeholder only */
sdp->swd_vp = vp;
sdp->swd_dev = (vp->v_type == VBLK) ? vp->v_rdev : NODEV;
- sdp->swd_bufq = bufq_init(BUFQ_DEFAULT);
/*
* XXX Is NFS elaboration necessary?
@@ -891,7 +890,7 @@ out:
* => caller should leave uvm.swap_data_lock unlocked, we may lock it
* if needed.
*/
-int
+static int
swap_on(struct proc *p, struct swapdev *sdp)
{
static int count = 0; /* static */
@@ -1089,7 +1088,7 @@ bad:
*
* => swap data should be locked, we will unlock.
*/
-int
+static int
swap_off(struct proc *p, struct swapdev *sdp)
{
int error = 0;
@@ -1150,7 +1149,6 @@ swap_off(struct proc *p, struct swapdev *sdp)
extent_free(swapmap, sdp->swd_drumoffset, sdp->swd_drumsize,
EX_WAITOK);
extent_destroy(sdp->swd_ex);
- bufq_destroy(sdp->swd_bufq);
free(sdp, M_VMSWAP);
simple_unlock(&uvm.swap_data_lock);
return (0);
@@ -1239,7 +1237,7 @@ swstrategy(struct buf *bp)
/*
* sw_reg_strategy: handle swap i/o to regular files
*/
-void
+static void
sw_reg_strategy(struct swapdev *sdp, struct buf *bp, int bn)
{
struct vnode *vp;
@@ -1385,7 +1383,7 @@ sw_reg_strategy(struct swapdev *sdp, struct buf *bp, int bn)
bgetvp(vp, &nbp->vb_buf);
/* sort it in and start I/O if we are not over our limit */
- BUFQ_ADD(sdp->swd_bufq, &nbp->vb_buf);
+ disksort(&sdp->swd_tab, &nbp->vb_buf);
sw_reg_start(sdp);
splx(s);
@@ -1416,7 +1414,7 @@ out: /* Arrive here at splbio */
*
* => reqs are sorted by disksort (above)
*/
-void
+static void
sw_reg_start(struct swapdev *sdp)
{
struct buf *bp;
@@ -1428,11 +1426,12 @@ sw_reg_start(struct swapdev *sdp)
sdp->swd_flags |= SWF_BUSY;
- while (sdp->swd_active < sdp->swd_maxactive) {
- bp = BUFQ_GET(sdp->swd_bufq);
+ while (sdp->swd_tab.b_active < sdp->swd_maxactive) {
+ bp = sdp->swd_tab.b_actf;
if (bp == NULL)
break;
- sdp->swd_active++;
+ sdp->swd_tab.b_actf = bp->b_actf;
+ sdp->swd_tab.b_active++;
UVMHIST_LOG(pdhist,
"sw_reg_start: bp %p vp %p blkno 0x%lx cnt 0x%lx",
@@ -1450,7 +1449,7 @@ sw_reg_start(struct swapdev *sdp)
*
* => note that we can recover the vndbuf struct by casting the buf ptr
*/
-void
+static void
sw_reg_iodone(struct buf *bp)
{
struct vndbuf *vbp = (struct vndbuf *) bp;
@@ -1516,7 +1515,7 @@ sw_reg_iodone(struct buf *bp)
/*
* done! start next swapdev I/O if one is pending
*/
- sdp->swd_active--;
+ sdp->swd_tab.b_active--;
sw_reg_start(sdp);
}
@@ -1744,7 +1743,7 @@ uvm_swap_get(struct vm_page *page, int swslot, int flags)
* uvm_swap_io: do an i/o operation to swap
*/
-int
+static int
uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags)
{
daddr64_t startblk;
@@ -2019,7 +2018,7 @@ uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags)
return (result);
}
-void
+static void
swapmount(void)
{
struct swapdev *sdp;
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c
index f5d33a3e188..271f0ec2edc 100644
--- a/sys/uvm/uvm_unix.c
+++ b/sys/uvm/uvm_unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_unix.c,v 1.37 2009/06/06 21:25:21 deraadt Exp $ */
+/* $OpenBSD: uvm_unix.c,v 1.38 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */
/*
@@ -147,8 +147,6 @@ uvm_grow(struct proc *p, vaddr_t sp)
vm->vm_ssize += si;
}
-#ifndef SMALL_KERNEL
-
/*
* uvm_coredump: dump core!
*/
@@ -322,5 +320,3 @@ uvm_coredump_walkmap(struct proc *p, void *iocookie,
return (0);
}
-
-#endif /* !SMALL_KERNEL */
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 439cfe03712..83037992028 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.65 2009/06/16 17:14:15 oga Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.66 2009/06/17 00:13:59 oga Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*