o Revert a part of revision 1.66, contrary to what that commit message says,
deinlining vm_map_entry_behavior() and vm_map_entry_set_behavior() actually increases the kernel's size. o Make vm_map_entry_set_behavior() static and add a comment describing its purpose. o Remove an unnecessary initialization statement from vm_map_entry_splay().
This commit is contained in:
parent
4f54232f46
commit
b55171a0a3
@ -356,19 +356,6 @@ vmspace_swap_count(struct vmspace *vmspace)
|
|||||||
return (count);
|
return (count);
|
||||||
}
|
}
|
||||||
|
|
||||||
u_char
|
|
||||||
vm_map_entry_behavior(struct vm_map_entry *entry)
|
|
||||||
{
|
|
||||||
return entry->eflags & MAP_ENTRY_BEHAV_MASK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior)
|
|
||||||
{
|
|
||||||
entry->eflags = (entry->eflags & ~MAP_ENTRY_BEHAV_MASK) |
|
|
||||||
(behavior & MAP_ENTRY_BEHAV_MASK);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_vm_map_lock(vm_map_t map, const char *file, int line)
|
_vm_map_lock(vm_map_t map, const char *file, int line)
|
||||||
{
|
{
|
||||||
@ -527,6 +514,19 @@ vm_map_entry_create(vm_map_t map)
|
|||||||
return (new_entry);
|
return (new_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* vm_map_entry_set_behavior:
|
||||||
|
*
|
||||||
|
* Set the expected access behavior, either normal, random, or
|
||||||
|
* sequential.
|
||||||
|
*/
|
||||||
|
static __inline void
|
||||||
|
vm_map_entry_set_behavior(vm_map_entry_t entry, u_char behavior)
|
||||||
|
{
|
||||||
|
entry->eflags = (entry->eflags & ~MAP_ENTRY_BEHAV_MASK) |
|
||||||
|
(behavior & MAP_ENTRY_BEHAV_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* vm_map_entry_splay:
|
* vm_map_entry_splay:
|
||||||
*
|
*
|
||||||
@ -543,7 +543,6 @@ vm_map_entry_splay(vm_offset_t address, vm_map_entry_t root)
|
|||||||
|
|
||||||
if (root == NULL)
|
if (root == NULL)
|
||||||
return (root);
|
return (root);
|
||||||
dummy.left = dummy.right = NULL;
|
|
||||||
lefttreemax = righttreemin = &dummy;
|
lefttreemax = righttreemin = &dummy;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (address < root->start) {
|
if (address < root->start) {
|
||||||
|
@ -133,6 +133,14 @@ struct vm_map_entry {
|
|||||||
|
|
||||||
#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */
|
#define MAP_ENTRY_NOCOREDUMP 0x0400 /* don't include in a core */
|
||||||
|
|
||||||
|
#ifdef _KERNEL
|
||||||
|
static __inline u_char
|
||||||
|
vm_map_entry_behavior(vm_map_entry_t entry)
|
||||||
|
{
|
||||||
|
return (entry->eflags & MAP_ENTRY_BEHAV_MASK);
|
||||||
|
}
|
||||||
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maps are doubly-linked lists of map entries, kept sorted
|
* Maps are doubly-linked lists of map entries, kept sorted
|
||||||
* by address. A single hint is provided to start
|
* by address. A single hint is provided to start
|
||||||
@ -210,9 +218,6 @@ struct vmspace {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
u_char vm_map_entry_behavior(struct vm_map_entry *entry);
|
|
||||||
void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macros: vm_map_lock, etc.
|
* Macros: vm_map_lock, etc.
|
||||||
* Function:
|
* Function:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user