summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/disable-more-counters.patch83
-rw-r--r--debian/patches/nrqs.patch27
-rw-r--r--debian/patches/series2
3 files changed, 0 insertions, 112 deletions
diff --git a/debian/patches/disable-more-counters.patch b/debian/patches/disable-more-counters.patch
deleted file mode 100644
index 9e5a106..0000000
--- a/debian/patches/disable-more-counters.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-commit 862b733dcbeabed8dd545e1c3b3e55bb4e4da52f
-Author: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Thu Apr 23 19:51:51 2015 +0200
-
- kern: disable stack allocation counters by default
-
- Disable the stack allocation counters by default. Casual checking
- revealed that the hits-to-miss ratio is excellent.
-
- * kern/thread.c (stack_alloc_{hits,misses,max}): Move variables...
- * kern/counters.c: ... here, and add the usual counter prefix.
- * kern/counters.h: New declarations.
-
-diff --git a/kern/counters.c b/kern/counters.c
-index 74fd42d..0a0665b 100644
---- a/kern/counters.c
-+++ b/kern/counters.c
-@@ -46,6 +46,9 @@ mach_counter_t c_stacks_current = 0;
- mach_counter_t c_stacks_max = 0;
- mach_counter_t c_stacks_min = 0;
- mach_counter_t c_stacks_total = 0;
-+mach_counter_t c_stack_alloc_hits = 0;
-+mach_counter_t c_stack_alloc_misses = 0;
-+mach_counter_t c_stack_alloc_max = 0;
- mach_counter_t c_clock_ticks = 0;
- mach_counter_t c_ipc_mqueue_send_block = 0;
- mach_counter_t c_ipc_mqueue_receive_block_user = 0;
-diff --git a/kern/counters.h b/kern/counters.h
-index bfa9b44..aa1e739 100644
---- a/kern/counters.h
-+++ b/kern/counters.h
-@@ -69,6 +69,9 @@ extern mach_counter_t c_stacks_current;
- extern mach_counter_t c_stacks_max;
- extern mach_counter_t c_stacks_min;
- extern mach_counter_t c_stacks_total;
-+extern mach_counter_t c_stack_alloc_hits;
-+extern mach_counter_t c_stack_alloc_misses;
-+extern mach_counter_t c_stack_alloc_max;
- extern mach_counter_t c_clock_ticks;
- extern mach_counter_t c_ipc_mqueue_send_block;
- extern mach_counter_t c_ipc_mqueue_receive_block_user;
-diff --git a/kern/thread.c b/kern/thread.c
-index 5ffa844..009884c 100644
---- a/kern/thread.c
-+++ b/kern/thread.c
-@@ -124,10 +124,6 @@ vm_offset_t stack_free_list; /* splsched only */
- unsigned int stack_free_count = 0; /* splsched only */
- unsigned int stack_free_limit = 1; /* patchable */
-
--unsigned int stack_alloc_hits = 0; /* debugging */
--unsigned int stack_alloc_misses = 0; /* debugging */
--unsigned int stack_alloc_max = 0; /* debugging */
--
- /*
- * The next field is at the base of the stack,
- * so the low end is left unsullied.
-@@ -160,10 +156,10 @@ boolean_t stack_alloc_try(
-
- if (stack != 0) {
- stack_attach(thread, stack, resume);
-- stack_alloc_hits++;
-+ counter(c_stack_alloc_hits++);
- return TRUE;
- } else {
-- stack_alloc_misses++;
-+ counter(c_stack_alloc_misses++);
- return FALSE;
- }
- }
-@@ -235,8 +231,11 @@ void stack_free(
- stack_lock();
- stack_next(stack) = stack_free_list;
- stack_free_list = stack;
-- if (++stack_free_count > stack_alloc_max)
-- stack_alloc_max = stack_free_count;
-+ stack_free_count += 1;
-+#if MACH_COUNTERS
-+ if (stack_free_count > c_stack_alloc_max)
-+ c_stack_alloc_max = stack_free_count;
-+#endif /* MACH_COUNTERS */
- stack_unlock();
- }
- }
diff --git a/debian/patches/nrqs.patch b/debian/patches/nrqs.patch
deleted file mode 100644
index 8c72ef1..0000000
--- a/debian/patches/nrqs.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 3a4f2e95e91b1b23d5c11190ff2dfc3c048deffb
-Author: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Fri Apr 24 00:08:23 2015 +0200
-
- kern: avoid hardcoding the lowest priority
-
- The number of priorities has been changed from 32 to 50 in
- 6a234201081156e6d5742e7eeabb68418b518fad.
-
- * kern/syscall_subr.c (thread_depress_priority): Avoid hardcoding the
- lowest priority.
-
-diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c
-index 3c369ef..6d23462 100644
---- a/kern/syscall_subr.c
-+++ b/kern/syscall_subr.c
-@@ -302,8 +302,8 @@ thread_depress_priority(
- * sched_pri to their lowest possible values.
- */
- thread->depress_priority = thread->priority;
-- thread->priority = 31;
-- thread->sched_pri = 31;
-+ thread->priority = NRQS-1;
-+ thread->sched_pri = NRQS-1;
- if (ticks != 0)
- set_timeout(&thread->depress_timer, ticks);
-
diff --git a/debian/patches/series b/debian/patches/series
index b8e88ed..6479389 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,8 +17,6 @@ reorder-ipc_port.patch
0007-ipc-inline-key-ipc-entry-lookup-functions.patch
0008-xxx-use-a-rbtree-for-reverse-lookups.patch
0009-kern-fix-comment.patch
-disable-more-counters.patch
-nrqs.patch
error-handling0001-kern-gracefully-handle-resource-shortage.patch
error-handling0002-vm-gracefully-handle-resource-shortage.patch
error-handling0003-kern-gracefully-handle-resource-shortage.patch