summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-10-12 21:35:25 +0000
committerdyson <dyson@FreeBSD.org>1996-10-12 21:35:25 +0000
commit57b4eae0a1b560daffdf0c095a7bcc36bc137858 (patch)
tree1514d1dde20f9ca659b86662c3565290d775a93e /sys/kern/kern_exit.c
parent01549fd11d3bc0ad90ac3bf29fa51ab279360b55 (diff)
downloadFreeBSD-src-57b4eae0a1b560daffdf0c095a7bcc36bc137858.zip
FreeBSD-src-57b4eae0a1b560daffdf0c095a7bcc36bc137858.tar.gz
Performance optimizations. One of which was meant to go in before the
previous snap. Specifically, kern_exit and kern_exec now makes a call into the pmap module to do a very fast removal of pages from the address space. Additionally, the pmap module now updates the PG_MAPPED and PG_WRITABLE flags. This is an optional optimization, but helpful on the X86.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 531c0b2..dd9d6c4 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
- * $Id: kern_exit.c,v 1.39 1996/09/13 09:17:03 bde Exp $
+ * $Id: kern_exit.c,v 1.40 1996/10/04 23:43:12 julian Exp $
*/
#include "opt_ktrace.h"
@@ -182,9 +182,12 @@ exit1(p, rv)
* Can't free the entire vmspace as the kernel stack
* may be mapped within that space also.
*/
- if (vm->vm_refcnt == 1)
+ if (vm->vm_refcnt == 1) {
+ pmap_remove_pages(&vm->vm_pmap, VM_MIN_ADDRESS,
+ VM_MAXUSER_ADDRESS);
(void) vm_map_remove(&vm->vm_map, VM_MIN_ADDRESS,
VM_MAXUSER_ADDRESS);
+ }
if (SESS_LEADER(p)) {
register struct session *sp = p->p_session;
OpenPOWER on IntegriCloud