- It's more accurate to say that vm_paging_needed() returns TRUE

than a positive number.
 - In pagedaemon_wakeup(), set vm_pages_needed to 1 rather than
   incrementing it to accomplish the same.
This commit is contained in:
alc 2003-02-02 07:16:40 +00:00
parent f9e95978f8
commit d064e9a2a7
2 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,7 @@ vm_paging_target(void)
}
/*
* Return a positive number if the pagedaemon needs to be woken up.
* Returns TRUE if the pagedaemon needs to be woken up.
*/
static __inline

View File

@ -1440,7 +1440,7 @@ vm_pageout()
* waste a lot of cpu.
*/
if (vm_pages_needed && !vm_page_count_min()) {
if (vm_paging_needed() <= 0)
if (!vm_paging_needed())
vm_pages_needed = 0;
wakeup(&cnt.v_free_count);
}
@ -1484,8 +1484,9 @@ vm_pageout()
void
pagedaemon_wakeup()
{
if (!vm_pages_needed && curthread->td_proc != pageproc) {
vm_pages_needed++;
vm_pages_needed = 1;
wakeup(&vm_pages_needed);
}
}