- 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:
Alan Cox 2003-02-02 07:16:40 +00:00
parent 1a972e076a
commit a1c0a78518
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110225
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);
}
}