diff options
Diffstat (limited to 'debian/patches/0002-Add-some-padding-to-make-objects-fit-a-single-cache-.patch')
-rw-r--r-- | debian/patches/0002-Add-some-padding-to-make-objects-fit-a-single-cache-.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches/0002-Add-some-padding-to-make-objects-fit-a-single-cache-.patch b/debian/patches/0002-Add-some-padding-to-make-objects-fit-a-single-cache-.patch new file mode 100644 index 0000000..f2de691 --- /dev/null +++ b/debian/patches/0002-Add-some-padding-to-make-objects-fit-a-single-cache-.patch @@ -0,0 +1,58 @@ +From 065a76b5dfc8e495b6ed170df57a1ce86894ead0 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed, 30 Apr 2014 16:15:34 +0200 +Subject: [PATCH 2/2] Add some padding to make objects fit a single cache line + +Add four bytes of padding to struct ipc_space, struct vm_fault_state, +and struct vm_map_entry. + +XXX vm_map_entry one is kinda expensive + +* ipc/ipc_space.h (struct ipc_space): Add four bytes of padding. +* vm/vm_fault.c (struct vm_fault_state): Likewise. +* vm/vm_map.h (struct vm_map_entry): Likewise. +--- + ipc/ipc_space.h | 1 + + vm/vm_fault.c | 1 + + vm/vm_map.h | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h +index c4683d2..278b4c9 100644 +--- a/ipc/ipc_space.h ++++ b/ipc/ipc_space.h +@@ -79,6 +79,7 @@ struct ipc_space { + ipc_entry_num_t is_tree_total; /* number of entries in the tree */ + ipc_entry_num_t is_tree_small; /* # of small entries in the tree */ + ipc_entry_num_t is_tree_hash; /* # of hashed entries in the tree */ ++ char padding[4]; /* pad to cacheline size */ + }; + + #define IS_NULL ((ipc_space_t) 0) +diff --git a/vm/vm_fault.c b/vm/vm_fault.c +index 686156c..431480e 100644 +--- a/vm/vm_fault.c ++++ b/vm/vm_fault.c +@@ -82,6 +82,7 @@ typedef struct vm_fault_state { + vm_offset_t vmfp_offset; + struct vm_page *vmfp_first_m; + vm_prot_t vmfp_access; ++ char padding[4]; /* pad to cacheline size */ + } vm_fault_state_t; + + struct kmem_cache vm_fault_state_cache; +diff --git a/vm/vm_map.h b/vm/vm_map.h +index b8103eb..ac5f109 100644 +--- a/vm/vm_map.h ++++ b/vm/vm_map.h +@@ -126,6 +126,7 @@ struct vm_map_entry { + -1 for non-persistent kernel map projected buffer entry; + pointer to corresponding kernel map entry for user map + projected buffer entry */ ++ char padding[4]; /* pad to cacheline size */ + }; + + typedef struct vm_map_entry *vm_map_entry_t; +-- +1.9.2 + |