Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150455600
D16413.id45851.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16413.id45851.diff
View Options
Index: vm/vm_map.c
===================================================================
--- vm/vm_map.c
+++ vm/vm_map.c
@@ -1276,10 +1276,10 @@
if (object->ref_count > 1 || object->shadow_count != 0)
vm_object_clear_flag(object, OBJ_ONEMAPPING);
VM_OBJECT_WUNLOCK(object);
- } else if (prev_entry != &map->header &&
- prev_entry->eflags == protoeflags &&
+ } else if (prev_entry != &map->header && prev_entry->end == start &&
+ (prev_entry->eflags & (MAP_ENTRY_IS_SUB_MAP | MAP_ENTRY_COW |
+ MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 &&
(cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 &&
- prev_entry->end == start && prev_entry->wired_count == 0 &&
(prev_entry->cred == cred ||
(prev_entry->object.vm_object != NULL &&
prev_entry->object.vm_object->cred == cred)) &&
@@ -1288,14 +1288,20 @@
(vm_size_t)(prev_entry->end - prev_entry->start),
(vm_size_t)(end - prev_entry->end), cred != NULL &&
(protoeflags & MAP_ENTRY_NEEDS_COPY) == 0)) {
+ KASSERT((prev_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0,
+ ("vm_map_insert: NEEDS_COPY set on non-COW entry %p",
+ prev_entry));
+
/*
* We were able to extend the object. Determine if we
* can extend the previous map entry to include the
* new range as well.
*/
- if (prev_entry->inheritance == inheritance &&
+ if (prev_entry->eflags == protoeflags &&
prev_entry->protection == prot &&
- prev_entry->max_protection == max) {
+ prev_entry->max_protection == max &&
+ prev_entry->inheritance == inheritance &&
+ prev_entry->wired_count == 0) {
if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0)
map->size += end - prev_entry->end;
prev_entry->end = end;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 8:53 AM (13 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30716303
Default Alt Text
D16413.id45851.diff (1 KB)
Attached To
Mode
D16413: Enable vm map entry and object coalescing under mlockall(MCL_FUTURE)
Attached
Detach File
Event Timeline
Log In to Comment