summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-30 15:23:36 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-30 17:37:39 +0200
commitdca400e253df97804dd04b24e96aebba878781a0 (patch)
treed6be6e3e0f3ae2a76ed60b39af9a0e97436a6148 /vm
parent4fda696b13d2d9fdb9496b2aeee1b05a6f852836 (diff)
vm: make struct vm_map fit into a cache line
Currently, the size of struct vm_map is 68 bytes. By using a bit field for the boolean flags, it can be made fit into a cache line. * vm/vm_map.h (struct vm_map): Use a bit field for the boolean flags wait_for_space and wiring_required.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_map.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/vm/vm_map.h b/vm/vm_map.h
index b6bc177..b8103eb 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -175,9 +175,12 @@ struct vm_map {
vm_map_entry_t hint; /* hint for quick lookups */
decl_simple_lock_data(, hint_lock) /* lock for hint storage */
vm_map_entry_t first_free; /* First free space hint */
- boolean_t wait_for_space; /* Should callers wait
+
+ /* Flags */
+ unsigned int wait_for_space:1, /* Should callers wait
for space? */
- boolean_t wiring_required;/* All memory wired? */
+ /* boolean_t */ wiring_required:1; /* All memory wired? */
+
unsigned int timestamp; /* Version number */
};