summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/vm_machdep.c4
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 5293ed3..a68b4ea 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -116,6 +116,7 @@ static struct {
} sf_freelist;
static u_int sf_buf_alloc_want;
+extern int nsfbufspeak, nsfbufsused;
/*
* Finish a fork operation, with process p2 nearly set up.
@@ -282,6 +283,8 @@ sf_buf_alloc(struct vm_page *m)
if (sf != NULL) {
SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list);
sf->m = m;
+ nsfbufsused++;
+ nsfbufspeak = max(nsfbufspeak, nsfbufsused);
pmap_qenter(sf->kva, &sf->m, 1);
}
mtx_unlock(&sf_freelist.sf_lock);
@@ -313,6 +316,7 @@ sf_buf_free(void *addr, void *args)
sf->m = NULL;
mtx_lock(&sf_freelist.sf_lock);
SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
+ nsfbufsused--;
if (sf_buf_alloc_want > 0)
wakeup_one(&sf_freelist);
mtx_unlock(&sf_freelist.sf_lock);
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index 5293ed3..a68b4ea 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -116,6 +116,7 @@ static struct {
} sf_freelist;
static u_int sf_buf_alloc_want;
+extern int nsfbufspeak, nsfbufsused;
/*
* Finish a fork operation, with process p2 nearly set up.
@@ -282,6 +283,8 @@ sf_buf_alloc(struct vm_page *m)
if (sf != NULL) {
SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list);
sf->m = m;
+ nsfbufsused++;
+ nsfbufspeak = max(nsfbufspeak, nsfbufsused);
pmap_qenter(sf->kva, &sf->m, 1);
}
mtx_unlock(&sf_freelist.sf_lock);
@@ -313,6 +316,7 @@ sf_buf_free(void *addr, void *args)
sf->m = NULL;
mtx_lock(&sf_freelist.sf_lock);
SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
+ nsfbufsused--;
if (sf_buf_alloc_want > 0)
wakeup_one(&sf_freelist);
mtx_unlock(&sf_freelist.sf_lock);
OpenPOWER on IntegriCloud