summaryrefslogtreecommitdiff
path: root/ufs/pager.c
diff options
context:
space:
mode:
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