diff options
Diffstat (limited to 'debian/patches/0001-vm-make-struct-vm_map-fit-into-a-cache-line.patch')
-rw-r--r-- | debian/patches/0001-vm-make-struct-vm_map-fit-into-a-cache-line.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/0001-vm-make-struct-vm_map-fit-into-a-cache-line.patch b/debian/patches/0001-vm-make-struct-vm_map-fit-into-a-cache-line.patch new file mode 100644 index 0000000..41a3ca4 --- /dev/null +++ b/debian/patches/0001-vm-make-struct-vm_map-fit-into-a-cache-line.patch @@ -0,0 +1,36 @@ +From 02f3fe277a80a4f32ffae04b061808a8bdf5bd59 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: [PATCH 1/2] 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 */ + }; + +-- +1.9.2 + |