From 44428f621de9d1c91ed3f6f3e5fa94ef16768d7b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 15 Mar 1999 06:24:52 +0000 Subject: [PATCH] Two changes: In general, vm_map_simplify_entry should be performed INSIDE the loop that traverses the map, not outside. (Changed: vm_map_inherit, vm_map_pageable.) vm_fault_unwire doesn't acquire the map lock (or block holding it). Thus, vm_map_set/clear_recursive shouldn't be called. (Changed: vm_map_user_pageable, vm_map_pageable.) --- sys/vm/vm_map.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 00613b36e90f..eb6f8d6974fd 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.155 1999/03/08 03:53:07 alc Exp $ + * $Id: vm_map.c,v 1.156 1999/03/09 08:00:17 alc Exp $ */ /* @@ -1380,10 +1380,11 @@ vm_map_inherit(vm_map_t map, vm_offset_t start, vm_offset_t end, entry->inheritance = new_inheritance; + vm_map_simplify_entry(map, entry); + entry = entry->next; } - vm_map_simplify_entry(map, temp_entry); vm_map_unlock(map); return (KERN_SUCCESS); } @@ -1421,9 +1422,6 @@ vm_map_user_pageable(map, start, end, new_pageable) * becomes completely unwired, unwire its physical pages and * mappings. */ - vm_map_set_recursive(map); - - entry = start_entry; while ((entry != &map->header) && (entry->start < end)) { if (entry->eflags & MAP_ENTRY_USER_WIRED) { vm_map_clip_end(map, entry, end); @@ -1435,7 +1433,6 @@ vm_map_user_pageable(map, start, end, new_pageable) vm_map_simplify_entry(map,entry); entry = entry->next; } - vm_map_clear_recursive(map); } else { entry = start_entry; @@ -1592,8 +1589,6 @@ vm_map_pageable(map, start, end, new_pageable) * becomes completely unwired, unwire its physical pages and * mappings. */ - vm_map_set_recursive(map); - entry = start_entry; while ((entry != &map->header) && (entry->start < end)) { vm_map_clip_end(map, entry, end); @@ -1602,10 +1597,10 @@ vm_map_pageable(map, start, end, new_pageable) if (entry->wired_count == 0) vm_fault_unwire(map, entry->start, entry->end); + vm_map_simplify_entry(map, entry); + entry = entry->next; } - vm_map_simplify_entry(map, start_entry); - vm_map_clear_recursive(map); } else { /* * Wiring. We must do this in two passes: