Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132538746
D19826.id55839.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D19826.id55839.diff
View Options
Index: sys/vm/vm_map.c
===================================================================
--- sys/vm/vm_map.c
+++ sys/vm/vm_map.c
@@ -917,36 +917,38 @@
entry->max_free = MAX(max_left, max_right);
}
-#define SPLAY_LEFT_STEP(root, y, rlist, test) do { \
- y = root->left; \
- if (y != NULL && (test)) { \
- /* Rotate right and make y root. */ \
- root->left = y->right; \
- y->right = root; \
- vm_map_entry_set_max_free(root); \
- root = y; \
- y = root->left; \
- } \
- /* Put root on rlist. */ \
- root->left = rlist; \
- rlist = root; \
- root = y; \
+#define SPLAY_LEFT_STEP(root, y, rlist, test) do { \
+ y = root->left; \
+ if (y != NULL && (test)) { \
+ /* Rotate right and make y root. */ \
+ root->left = y->right; \
+ y->right = root; \
+ if (root->max_free == y->max_free) \
+ vm_map_entry_set_max_free(root); \
+ root = y; \
+ y = root->left; \
+ } \
+ /* Put root on rlist. */ \
+ root->left = rlist; \
+ rlist = root; \
+ root = y; \
} while (0)
-#define SPLAY_RIGHT_STEP(root, y, llist, test) do { \
- y = root->right; \
- if (y != NULL && (test)) { \
- /* Rotate left and make y root. */ \
- root->right = y->left; \
- y->left = root; \
- vm_map_entry_set_max_free(root); \
- root = y; \
- y = root->right; \
- } \
- /* Put root on llist. */ \
- root->right = llist; \
- llist = root; \
- root = y; \
+#define SPLAY_RIGHT_STEP(root, y, llist, test) do { \
+ y = root->right; \
+ if (y != NULL && (test)) { \
+ /* Rotate left and make y root. */ \
+ root->right = y->left; \
+ y->left = root; \
+ if (root->max_free == y->max_free) \
+ vm_map_entry_set_max_free(root); \
+ root = y; \
+ y = root->right; \
+ } \
+ /* Put root on llist. */ \
+ root->right = llist; \
+ llist = root; \
+ root = y; \
} while (0)
/*
@@ -1019,14 +1021,22 @@
while (llist != NULL) {
y = llist->right;
llist->right = ltree;
- vm_map_entry_set_max_free(llist);
+#if 0
+ if (llist->max_free > ((ltree != NULL) ? ltree->max_free :
+ llist->next->start - llist->end))
+#endif
+ vm_map_entry_set_max_free(llist);
ltree = llist;
llist = y;
}
while (rlist != NULL) {
y = rlist->left;
rlist->left = rtree;
- vm_map_entry_set_max_free(rlist);
+#if 0
+ if (rlist->max_free > ((rtree != NULL) ? rtree->max_free :
+ rlist->start - rlist->prev->end))
+#endif
+ vm_map_entry_set_max_free(rlist);
rtree = rlist;
rlist = y;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 18, 7:24 PM (11 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23890887
Default Alt Text
D19826.id55839.diff (2 KB)
Attached To
Mode
D19826: reduce accesses to vm_map entries off the search path in updating max_free
Attached
Detach File
Event Timeline
Log In to Comment