--- Net2/vm/vm_fault.c 2018/04/24 18:03:57 1.1 +++ Net2/vm/vm_fault.c 2018/04/24 18:09:15 1.1.1.3 @@ -62,6 +62,8 @@ * rights to redistribute these changes. */ +static char rcsid[] = "$Header: /var/lib/cvsd/net2/Net2/vm/vm_fault.c,v 1.1.1.3 2018/04/24 18:09:15 root Exp $"; + /* * Page fault handling module. */ @@ -244,6 +246,7 @@ vm_fault(map, vaddr, fault_type, change_ PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -253,6 +256,7 @@ vm_fault(map, vaddr, fault_type, change_ #else PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX! */ thread_block(); vm_object_deallocate(first_object); goto RetryFault; @@ -276,6 +280,7 @@ vm_fault(map, vaddr, fault_type, change_ PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -288,6 +293,7 @@ vm_fault(map, vaddr, fault_type, change_ PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX */ thread_block(); vm_object_deallocate(first_object); goto RetryFault; @@ -524,7 +530,7 @@ vm_fault(map, vaddr, fault_type, change_ */ vm_page_lock_queues(); - vm_page_deactivate(m); + vm_page_activate(m); pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE); vm_page_unlock_queues(); @@ -621,6 +627,7 @@ vm_fault(map, vaddr, fault_type, change_ copy_object->ref_count--; vm_object_unlock(copy_object); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -637,6 +644,7 @@ vm_fault(map, vaddr, fault_type, change_ copy_object->ref_count--; vm_object_unlock(copy_object); UNLOCK_THINGS; +thread_wakeup(&vm_pages_needed); /* XXX */ thread_block(); vm_object_deallocate(first_object); goto RetryFault;