From cf52214a7b92b84dcb178a7660f769ace2c60c94 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 21 Sep 1994 20:18:44 +0000 Subject: Formerly pager.c.~30~ --- ufs/pager.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3