From dca400e253df97804dd04b24e96aebba878781a0 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed, 30 Apr 2014 15:23:36 +0200 Subject: 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. --- vm/vm_map.h | 7 +++++-- 1 file 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 */ }; -- cgit v1.2.3