summaryrefslogtreecommitdiff
path: root/ufs/pager.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-09-21 20:18:44 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-09-21 20:18:44 +0000
commit06e3d2005d0b71a75974deffb66a93e396c00c04 (patch)
tree565cdd3194085c03e691ed6d0086aeb83e2686f9 /ufs/pager.c
parent9faf3438c0da06bb0bcf74e176479245fbd33619 (diff)
Formerly pager.c.~30~
Diffstat (limited to 'ufs/pager.c')
-rw-r--r--ufs/pager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ufs/pager.c b/ufs/pager.c
index 4de29518..1916a79e 100644
--- a/ufs/pager.c
+++ b/ufs/pager.c
@@ -46,6 +46,13 @@ static struct mutex pagernplock = MUTEX_INITIALIZER;
char typechars[] = "ICSDF";
+/* Limit the number of outstanding FILE_DATA paging requests.
+ Otherwise the kernel can send all the data at once and overwhelm us. */
+#define DATA_MAX_THREADS 10
+static int ndatapagethreads;
+static struct mutex ndpthreads_lock = MUTEX_INITIALIZER;
+static struct condition ndpthreads_wait = CONDITION_INITIALIZER;
+
/* Find the location on disk of page OFFSET in pager UPI. Return the
disk address (in disk block) in *ADDR. If *NPLOCK is set on
return, then release that mutex after I/O on the data has