From eb198debb87180989f8b19a7edc7eccb01f90fa5 Mon Sep 17 00:00:00 2001 From: dg Date: Wed, 1 Mar 1995 23:30:04 +0000 Subject: 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. --- sys/vm/vm_pageout.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'sys/vm/vm_pageout.h') 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); -- cgit v1.1