diff options
| author | Alan Cox <alc@FreeBSD.org> | 2006-09-29 04:51:16 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2006-09-29 04:51:16 +0000 |
| commit | 5c9b71b5c795a60151431c5e7f559d98f17abd10 (patch) | |
| tree | 382aabe559f0386a74ccdd88abb4680d95ca4ab8 /sys/vm | |
| parent | ffcdeef457016be83d12f98362bf06fa2f0491a2 (diff) | |
Notes
Diffstat (limited to 'sys/vm')
| -rw-r--r-- | sys/vm/vm_page.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index db139a35b28f..9a3484370673 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -884,10 +884,20 @@ loop: vm_page_unlock_queues(); atomic_add_int(&vm_pageout_deficit, 1); pagedaemon_wakeup(); - return (NULL); + + if (page_req != VM_ALLOC_SYSTEM) + return (NULL); + + mtx_lock_spin(&vm_page_queue_free_mtx); + if (cnt.v_free_count <= cnt.v_interrupt_free_min) { + mtx_unlock_spin(&vm_page_queue_free_mtx); + return (NULL); + } + m = vm_pageq_find(PQ_FREE, color, (req & VM_ALLOC_ZERO) != 0); + } else { + vm_page_unlock_queues(); + goto loop; } - vm_page_unlock_queues(); - goto loop; } else { /* * Not allocatable from cache from interrupt, give up. |
