summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-02-25 03:56:15 +0000
committerdyson <dyson@FreeBSD.org>1998-02-25 03:56:15 +0000
commit014146c040ed6640e606b46e58c066fc3a1c442c (patch)
tree58ba9b01b799e946135e458cf791510488f813df /sys/vm/vm_object.h
parentff694902b34f411a83d04c782b9310e79c3701e9 (diff)
downloadFreeBSD-src-014146c040ed6640e606b46e58c066fc3a1c442c.zip
FreeBSD-src-014146c040ed6640e606b46e58c066fc3a1c442c.tar.gz
Fix page prezeroing for SMP, and fix some potential paging-in-progress
hangs. The paging-in-progress diagnosis was a result of Tor Egge's excellent detective work. Submitted by: Partially from Tor Egge.
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r--sys/vm/vm_object.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index fe41881..76cb4d2 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.h,v 1.44 1998/01/31 11:56:43 dyson Exp $
+ * $Id: vm_object.h,v 1.45 1998/02/05 03:32:45 dyson Exp $
*/
/*
@@ -164,6 +164,28 @@ vm_object_pip_wakeup(vm_object_t object)
}
}
+static __inline void
+vm_object_pip_sleep(vm_object_t object, char *waitid)
+{
+ int s;
+
+ if (object->paging_in_progress) {
+ s = splvm();
+ if (object->paging_in_progress) {
+ object->flags |= OBJ_PIPWNT;
+ tsleep(object, PVM, waitid, 0);
+ }
+ splx(s);
+ }
+}
+
+static __inline void
+vm_object_pip_wait(vm_object_t object, char *waitid)
+{
+ while (object->paging_in_progress)
+ vm_object_pip_sleep(object, waitid);
+}
+
vm_object_t vm_object_allocate __P((objtype_t, vm_size_t));
void _vm_object_allocate __P((objtype_t, vm_size_t, vm_object_t));
boolean_t vm_object_coalesce __P((vm_object_t, vm_pindex_t, vm_size_t, vm_size_t));
OpenPOWER on IntegriCloud