diff options
author | kib <kib@FreeBSD.org> | 2008-09-29 19:45:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-09-29 19:45:12 +0000 |
commit | de9e8917480edc80682a8b4355dfd83e315ea796 (patch) | |
tree | 18104c10e6cb4ca4d2a3d1e545baf694cdb57694 /sys/vm/vm_pageout.h | |
parent | 7e5e6d6f2777c86fc9d9242280c9293aac141d21 (diff) | |
download | FreeBSD-src-de9e8917480edc80682a8b4355dfd83e315ea796.zip FreeBSD-src-de9e8917480edc80682a8b4355dfd83e315ea796.tar.gz |
Move the code for doing out-of-memory grass from vm_pageout_scan()
into the separate function vm_pageout_oom(). Supply a parameter for
vm_pageout_oom() describing a reason for the call.
Call vm_pageout_oom() from the swp_pager_meta_build() when swap zone
is exhausted.
Reviewed by: alc
Tested by: pho, jhb
MFC after: 2 weeks
Diffstat (limited to 'sys/vm/vm_pageout.h')
-rw-r--r-- | sys/vm/vm_pageout.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 1586ac4..15ca570 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -83,6 +83,9 @@ extern int vm_pageout_page_count; #define VM_SWAP_NORMAL 1 #define VM_SWAP_IDLE 2 +#define VM_OOM_MEM 1 +#define VM_OOM_SWAPZ 2 + /* * Exported routines. */ @@ -100,5 +103,6 @@ extern void vm_waitpfault(void); #ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); int vm_pageout_flush(vm_page_t *, int, int); +void vm_pageout_oom(int shortage); #endif #endif /* _VM_VM_PAGEOUT_H_ */ |