Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2011 15:23:02 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218070 - head/sys/vm
Message-ID:  <201101291523.p0TFN2dd036283@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat Jan 29 15:23:02 2011
New Revision: 218070
URL: http://svn.freebsd.org/changeset/base/218070

Log:
  Reenable the call to vm_map_simplify_entry() from vm_map_insert() for non-
  MAP_STACK_* entries.  (See r71983 and r74235.)
  
  In some cases, performing this call to vm_map_simplify_entry() halves the
  number of vm map entries used by the Sun JDK.

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Sat Jan 29 14:36:31 2011	(r218069)
+++ head/sys/vm/vm_map.c	Sat Jan 29 15:23:02 2011	(r218070)
@@ -1293,17 +1293,13 @@ charged:
 	vm_map_entry_link(map, prev_entry, new_entry);
 	map->size += new_entry->end - new_entry->start;
 
-#if 0
 	/*
-	 * Temporarily removed to avoid MAP_STACK panic, due to
-	 * MAP_STACK being a huge hack.  Will be added back in
-	 * when MAP_STACK (and the user stack mapping) is fixed.
+	 * It may be possible to merge the new entry with the next and/or
+	 * previous entries.  However, due to MAP_STACK_* being a hack, a
+	 * panic can result from merging such entries.
 	 */
-	/*
-	 * It may be possible to simplify the entry
-	 */
-	vm_map_simplify_entry(map, new_entry);
-#endif
+	if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0)
+		vm_map_simplify_entry(map, new_entry);
 
 	if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) {
 		vm_map_pmap_enter(map, start, prot,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101291523.p0TFN2dd036283>