diff options
author | dg <dg@FreeBSD.org> | 1995-03-01 23:30:04 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-01 23:30:04 +0000 |
commit | eb198debb87180989f8b19a7edc7eccb01f90fa5 (patch) | |
tree | 939577bd1f960df71501392b5bf83109c6c968b5 /sys/vm/vm_pageout.h | |
parent | e8c06a9513ade8cda989aadc92beefcb5596acf0 (diff) | |
download | FreeBSD-src-eb198debb87180989f8b19a7edc7eccb01f90fa5.zip FreeBSD-src-eb198debb87180989f8b19a7edc7eccb01f90fa5.tar.gz |
Various changes from John and myself that do the following:
New functions create - vm_object_pip_wakeup and pagedaemon_wakeup that
are used to reduce the actual number of wakeups.
New function vm_page_protect which is used in conjuction with some new
page flags to reduce the number of calls to pmap_page_protect.
Minor changes to reduce unnecessary spl nesting.
Rewrote vm_page_alloc() to improve readability.
Various other mostly cosmetic changes.
Diffstat (limited to 'sys/vm/vm_pageout.h')
-rw-r--r-- | sys/vm/vm_pageout.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 6a34d29..6e77a33 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.h,v 1.7 1995/01/09 16:05:54 davidg Exp $ + * $Id: vm_pageout.h,v 1.8 1995/01/10 07:32:50 davidg Exp $ */ #ifndef _VM_VM_PAGEOUT_H_ @@ -91,9 +91,18 @@ extern int vm_pageout_pages_needed; * Signal pageout-daemon and wait for it. */ +static inline void +pagedaemon_wakeup() +{ + if (!vm_pages_needed && curproc != pageproc) { + vm_pages_needed++; + wakeup((caddr_t) &vm_pages_needed); + } +} + #define VM_WAIT vm_wait() -inline static void +static inline void vm_wait() { int s; @@ -104,7 +113,10 @@ vm_wait() tsleep((caddr_t) &vm_pageout_pages_needed, PSWP, "vmwait", 0); vm_pageout_pages_needed = 0; } else { - wakeup((caddr_t) &vm_pages_needed); + if (!vm_pages_needed) { + vm_pages_needed++; + wakeup((caddr_t) &vm_pages_needed); + } tsleep((caddr_t) &cnt.v_free_count, PVM, "vmwait", 0); } splx(s); |