diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-09-21 20:18:44 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-09-21 20:18:44 +0000 |
commit | cf52214a7b92b84dcb178a7660f769ace2c60c94 (patch) | |
tree | 3f98e96ad95eb9bbed56b689ebedbc6af496447c | |
parent | 753fa1ab4a6d5198ad7f247e5f7629f13fddefc0 (diff) |
Formerly pager.c.~30~
-rw-r--r-- | ufs/pager.c | 7 |
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 |