diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-16 14:26:14 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-16 14:26:14 +0100 |
commit | cf5f4f8c1461785a049c950611b841bd33c0a536 (patch) | |
tree | 0ecf2fe838d88d15190ba6b9da95984d600c1731 /debian | |
parent | 54472a00702de4e99cf5f9d3f404ef5bb4236bee (diff) |
add patch series
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/0001-ipc-tune-size-of-cached-kernel-message-buffers.patch | 38 | ||||
-rw-r--r-- | debian/patches/0002-ipc-guard-test-code-with-MACH_IPC_TEST.patch | 72 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 112 insertions, 0 deletions
diff --git a/debian/patches/0001-ipc-tune-size-of-cached-kernel-message-buffers.patch b/debian/patches/0001-ipc-tune-size-of-cached-kernel-message-buffers.patch new file mode 100644 index 0000000..b0ce51c --- /dev/null +++ b/debian/patches/0001-ipc-tune-size-of-cached-kernel-message-buffers.patch @@ -0,0 +1,38 @@ +From 73314404a9bd7106514b711cd69765b4081b6bed Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Tue, 16 Dec 2014 13:36:08 +0100 +Subject: [PATCH gnumach 1/2] ipc: tune size of cached kernel message buffers + +The previous limit was 256 bytes. That seems a little crummy by +todays standards, and we are frequently sending bigger packets +(e.g. every RPC containing a string_t on Hurd). + +Use the page size for IKM_SAVED_KMSG_SIZE to make sure the page is +pinned to a single processor. + +* ipc/ipc_kmsg.h (IKM_SAVED_KMSG_SIZE): Define to `PAGE_SIZE'. +--- + ipc/ipc_kmsg.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ipc/ipc_kmsg.h b/ipc/ipc_kmsg.h +index 07695fb..f06857a 100644 +--- a/ipc/ipc_kmsg.h ++++ b/ipc/ipc_kmsg.h +@@ -92,9 +92,12 @@ extern ipc_kmsg_t ipc_kmsg_cache[NCPUS]; + /* + * The size of the kernel message buffers that will be cached. + * IKM_SAVED_KMSG_SIZE includes overhead; IKM_SAVED_MSG_SIZE doesn't. ++ * ++ * We use the page size for IKM_SAVED_KMSG_SIZE to make sure the ++ * page is pinned to a single processor. + */ + +-#define IKM_SAVED_KMSG_SIZE ((vm_size_t) 256) ++#define IKM_SAVED_KMSG_SIZE PAGE_SIZE + #define IKM_SAVED_MSG_SIZE ikm_less_overhead(IKM_SAVED_KMSG_SIZE) + + #define ikm_alloc(size) \ +-- +2.1.3 + diff --git a/debian/patches/0002-ipc-guard-test-code-with-MACH_IPC_TEST.patch b/debian/patches/0002-ipc-guard-test-code-with-MACH_IPC_TEST.patch new file mode 100644 index 0000000..4308b90 --- /dev/null +++ b/debian/patches/0002-ipc-guard-test-code-with-MACH_IPC_TEST.patch @@ -0,0 +1,72 @@ +From 1bb1ba65cb9efceeb20b4296f903f3fe58b3341e Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Tue, 16 Dec 2014 14:21:26 +0100 +Subject: [PATCH gnumach 2/2] ipc: guard test code with `MACH_IPC_TEST' + +* ipc/ipc_kmsg.h (ikm_mark_bogus): New macro. +(ipc_kmsg_rmqueue_first_macro): Use `ikm_mark_bogus'. +* ipc/ipc_kmsg.c (ipc_kmsg_rmqueue): Likewise. +--- + ipc/ipc_kmsg.c | 4 +--- + ipc/ipc_kmsg.h | 19 +++++++++++++++---- + 2 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c +index 71a0d74..66643fd 100644 +--- a/ipc/ipc_kmsg.c ++++ b/ipc/ipc_kmsg.c +@@ -139,9 +139,7 @@ ipc_kmsg_rmqueue( + next->ikm_prev = prev; + prev->ikm_next = next; + } +- /* XXX Temporary debug logic */ +- kmsg->ikm_next = IKM_BOGUS; +- kmsg->ikm_prev = IKM_BOGUS; ++ ikm_mark_bogus (kmsg); + } + + /* +diff --git a/ipc/ipc_kmsg.h b/ipc/ipc_kmsg.h +index f06857a..620785b 100644 +--- a/ipc/ipc_kmsg.h ++++ b/ipc/ipc_kmsg.h +@@ -72,11 +72,24 @@ typedef struct ipc_kmsg { + #define ikm_plus_overhead(size) ((vm_size_t)((size) + IKM_OVERHEAD)) + #define ikm_less_overhead(size) ((mach_msg_size_t)((size) - IKM_OVERHEAD)) + ++#if MACH_IPC_TEST + /* +- * XXX For debugging. ++ * For debugging. + */ + #define IKM_BOGUS ((ipc_kmsg_t) 0xffffff10) + ++#define ikm_mark_bogus(kmsg) \ ++MACRO_BEGIN \ ++ (kmsg)->ikm_next = IKM_BOGUS; \ ++ (kmsg)->ikm_prev = IKM_BOGUS; \ ++MACRO_END ++ ++#else /* MACH_IPC_TEST */ ++ ++#define ikm_mark_bogus(kmsg) ; ++ ++#endif /* MACH_IPC_TEST */ ++ + /* + * We keep a per-processor cache of kernel message buffers. + * The cache saves the overhead/locking of using kalloc/kfree. +@@ -198,9 +211,7 @@ MACRO_BEGIN \ + _next->ikm_prev = _prev; \ + _prev->ikm_next = _next; \ + } \ +- /* XXX Debug paranoia */ \ +- kmsg->ikm_next = IKM_BOGUS; \ +- kmsg->ikm_prev = IKM_BOGUS; \ ++ ikm_mark_bogus (kmsg); \ + MACRO_END + + #define ipc_kmsg_enqueue_macro(queue, kmsg) \ +-- +2.1.3 + diff --git a/debian/patches/series b/debian/patches/series index 52021c2..1ade2b7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,5 @@ Add-some-padding-to-make-objects-fit-a-single-cache-.patch vm_cache_policy.patch +0001-ipc-tune-size-of-cached-kernel-message-buffers.patch +0002-ipc-guard-test-code-with-MACH_IPC_TEST.patch |