diff options
author | John Dyson <dyson@FreeBSD.org> | 1996-03-28 04:22:17 +0000 |
---|---|---|
committer | John Dyson <dyson@FreeBSD.org> | 1996-03-28 04:22:17 +0000 |
commit | f32dbbeeedc4a8662d610eaaca9556da35a41323 (patch) | |
tree | 158e93e5a45c0a40959f15309ad4742b25ae6469 /sys/vm/vm_map.c | |
parent | 3f0f267e5d79013ec93cea91d31b08364101a644 (diff) | |
download | src-f32dbbeeedc4a8662d610eaaca9556da35a41323.tar.gz src-f32dbbeeedc4a8662d610eaaca9556da35a41323.zip |
More map_simplify fixes from Alan Cox. This very significanly improves the
performance when the map has been chopped up. The map simplify operations
really work now.
Reviewed by: dyson
Submitted by: Alan Cox <alc@cs.rice.edu>
Notes
Notes:
svn path=/head/; revision=14864
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index ae6afe82ef7f..13a0c265c7f4 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.38 1996/03/12 13:46:13 dyson Exp $ + * $Id: vm_map.c,v 1.39 1996/03/13 01:18:14 dyson Exp $ */ /* @@ -850,17 +850,17 @@ vm_map_simplify_entry(map, entry) prev = entry->prev; if (prev != &map->header) { prevsize = prev->end - prev->start; - if ( prev->end == entry->start && - prev->object.vm_object == entry->object.vm_object && - prev->offset + prevsize == entry->offset && - prev->protection == entry->protection && - prev->max_protection == entry->max_protection && - prev->inheritance == entry->inheritance && - prev->needs_copy == entry->needs_copy && - prev->copy_on_write == entry->copy_on_write && - prev->is_a_map == FALSE && - prev->is_sub_map == FALSE && - prev->wired_count == 0) { + if ( (prev->end == entry->start) && + (prev->object.vm_object == entry->object.vm_object) && + (prev->offset + prevsize == entry->offset) && + (prev->needs_copy == entry->needs_copy) && + (prev->copy_on_write == entry->copy_on_write) && + (prev->protection == entry->protection) && + (prev->max_protection == entry->max_protection) && + (prev->inheritance == entry->inheritance) && + (prev->is_a_map == FALSE) && + (prev->is_sub_map == FALSE) && + (prev->wired_count == 0)) { if (map->first_free == prev) map->first_free = entry; vm_map_entry_unlink(map, prev); @@ -875,17 +875,17 @@ vm_map_simplify_entry(map, entry) if (next != &map->header) { nextsize = next->end - next->start; esize = entry->end - entry->start; - if (entry->end == next->start && - next->object.vm_object == entry->object.vm_object && - entry->offset + esize == next->offset && - next->protection == entry->protection && - next->max_protection == entry->max_protection && - next->inheritance == entry->inheritance && - next->needs_copy == entry->needs_copy && - next->copy_on_write == entry->copy_on_write && - next->is_a_map == FALSE && - next->is_sub_map == FALSE && - next->wired_count == 0) { + if ((entry->end == next->start) && + (next->object.vm_object == entry->object.vm_object) && + (entry->offset + esize == next->offset) && + (next->needs_copy == entry->needs_copy) && + (next->copy_on_write == entry->copy_on_write) && + (next->protection == entry->protection) && + (next->max_protection == entry->max_protection) && + (next->inheritance == entry->inheritance) && + (next->is_a_map == FALSE) && + (next->is_sub_map == FALSE) && + (next->wired_count == 0)) { if (map->first_free == next) map->first_free = entry; vm_map_entry_unlink(map, next); @@ -922,17 +922,13 @@ _vm_map_clip_start(map, entry, start) register vm_map_entry_t new_entry; /* - * See if we can simplify this entry first - */ - - vm_map_simplify_entry(map, entry); - - /* * Split off the front portion -- note that we must insert the new * entry BEFORE this one, so that this entry has the specified * starting address. */ + vm_map_simplify_entry(map, entry); + new_entry = vm_map_entry_create(map); *new_entry = *entry; @@ -1177,6 +1173,7 @@ vm_map_protect(map, start, end, new_prot, set_max) current = current->next; } + vm_map_simplify_entry(map, entry); vm_map_unlock(map); return (KERN_SUCCESS); } @@ -1226,6 +1223,7 @@ vm_map_inherit(map, start, end, new_inheritance) entry = entry->next; } + vm_map_simplify_entry(map, temp_entry); vm_map_unlock(map); return (KERN_SUCCESS); } @@ -1313,6 +1311,7 @@ vm_map_pageable(map, start, end, new_pageable) entry = entry->next; } + vm_map_simplify_entry(map, start_entry); lock_clear_recursive(&map->lock); } else { /* |