summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-20 19:08:15 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-20 19:08:15 +0100
commit7faa9f6b5433cfc2ad154ea8be59623fc48a9f23 (patch)
tree8e2e9f58f95a5dfec062e79f6b85b77a7fc6198d /debian
parenta4a1069d8acbb79ac7969aaf201faaa276f47e1b (diff)
drop merged patches
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/0001-kern-avoid-if-0ing-out-thread_collect_scan.patch56
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/tune-struct-thread.patch185
3 files changed, 0 insertions, 243 deletions
diff --git a/debian/patches/0001-kern-avoid-if-0ing-out-thread_collect_scan.patch b/debian/patches/0001-kern-avoid-if-0ing-out-thread_collect_scan.patch
deleted file mode 100644
index 125ef34..0000000
--- a/debian/patches/0001-kern-avoid-if-0ing-out-thread_collect_scan.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b0fa32c1d7de74a8b83b33833640ff30c84e9fbd Mon Sep 17 00:00:00 2001
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Wed, 18 Feb 2015 06:40:07 +0100
-Subject: [PATCH gnumach] kern: avoid #if 0ing out thread_collect_scan
-
-Currently, `thread_collect_scan' does nothing because `pcb_collect' is
-a nop. Its body is exempt from compilation by means of the
-preprocessor.
-
-This is unfortunate as it increases the risk of bitrot, and we still
-need to pay the price of rate-limiting thread_collect_scan.
-
-* kern/thread.c (thread_collect_scan): Drop #if 0 around the body.
-* vm/vm_pageout.c (vm_pageout_scan): Do not call
-`consider_thread_collect' and document why.
----
- kern/thread.c | 2 --
- vm/vm_pageout.c | 2 ++
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/kern/thread.c b/kern/thread.c
-index 8474950..c627a06 100644
---- a/kern/thread.c
-+++ b/kern/thread.c
-@@ -2236,7 +2236,6 @@ thread_wire(
-
- void thread_collect_scan(void)
- {
--#if 0
- register thread_t thread, prev_thread;
- processor_set_t pset, prev_pset;
-
-@@ -2289,7 +2288,6 @@ void thread_collect_scan(void)
- thread_deallocate(prev_thread);
- if (prev_pset != PROCESSOR_SET_NULL)
- pset_deallocate(prev_pset);
--#endif /* 0 */
- }
-
- boolean_t thread_collect_allowed = TRUE;
-diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
-index ecedb57..aff823a 100644
---- a/vm/vm_pageout.c
-+++ b/vm/vm_pageout.c
-@@ -551,6 +551,8 @@ void vm_pageout_scan(void)
- stack_collect();
- net_kmsg_collect();
- consider_task_collect();
-+ if (0) /* XXX: pcb_collect doesn't do anything yet, so it is
-+ pointless to call consider_thread_collect. */
- consider_thread_collect();
- slab_collect();
-
---
-2.1.4
-
diff --git a/debian/patches/series b/debian/patches/series
index 70a561c..102e3c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,5 +7,3 @@
Add-some-padding-to-make-objects-fit-a-single-cache-.patch
vm_cache_policy.patch
task-load.patch
-0001-kern-avoid-if-0ing-out-thread_collect_scan.patch
-tune-struct-thread.patch
diff --git a/debian/patches/tune-struct-thread.patch b/debian/patches/tune-struct-thread.patch
deleted file mode 100644
index 5dedc00..0000000
--- a/debian/patches/tune-struct-thread.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-commit 160d07d776a8163914ff74acab1887b035ea3691
-Author: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Tue Sep 30 09:08:44 2014 +0200
-
- XXX reduce struct thread size
-
-diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c
-index cc1672d..be82971 100644
---- a/kern/ipc_sched.c
-+++ b/kern/ipc_sched.c
-@@ -268,7 +268,7 @@ thread_handoff(
- */
- old->wake_active = FALSE;
- thread_unlock(old);
-- thread_wakeup((event_t)&old->wake_active);
-+ thread_wakeup(TH_EV_WAKE_ACTIVE(old));
- goto after_old_thread;
- }
- } else
-diff --git a/kern/sched_prim.c b/kern/sched_prim.c
-index 376217a..d7792ae 100644
---- a/kern/sched_prim.c
-+++ b/kern/sched_prim.c
-@@ -615,7 +615,7 @@ boolean_t thread_invoke(
- thread_lock(new_thread);
- new_thread->state &= ~TH_UNINT;
- thread_unlock(new_thread);
-- thread_wakeup(&new_thread->state);
-+ thread_wakeup(TH_EV_STATE(new_thread));
-
- if (continuation != (void (*)()) 0) {
- (void) spl0();
-@@ -637,7 +637,7 @@ boolean_t thread_invoke(
-
- new_thread->state &= ~(TH_SWAPPED | TH_UNINT);
- thread_unlock(new_thread);
-- thread_wakeup(&new_thread->state);
-+ thread_wakeup(TH_EV_STATE(new_thread));
-
- #if NCPUS > 1
- new_thread->last_processor = current_processor();
-@@ -676,7 +676,7 @@ boolean_t thread_invoke(
- if (old_thread->wake_active) {
- old_thread->wake_active = FALSE;
- thread_unlock(old_thread);
-- thread_wakeup((event_t)&old_thread->wake_active);
-+ thread_wakeup(TH_EV_WAKE_ACTIVE(old_thread));
-
- goto after_old_thread;
- }
-@@ -767,7 +767,7 @@ boolean_t thread_invoke(
-
- new_thread->state &= ~(TH_SWAPPED | TH_UNINT);
- thread_unlock(new_thread);
-- thread_wakeup(&new_thread->state);
-+ thread_wakeup(TH_EV_STATE(new_thread));
-
- /*
- * Thread is now interruptible.
-@@ -932,7 +932,7 @@ void thread_dispatch(
- if (thread->wake_active) {
- thread->wake_active = FALSE;
- thread_unlock(thread);
-- thread_wakeup((event_t)&thread->wake_active);
-+ thread_wakeup(TH_EV_WAKE_ACTIVE(thread));
- return;
- }
- break;
-diff --git a/kern/thread.c b/kern/thread.c
-index 8474950..f49811e 100644
---- a/kern/thread.c
-+++ b/kern/thread.c
-@@ -968,7 +968,7 @@ kern_return_t thread_halt(
- * operation can never cause a deadlock.)
- */
- if (cur_thread->ast & AST_HALT) {
-- thread_wakeup_with_result((event_t)&cur_thread->wake_active,
-+ thread_wakeup_with_result(TH_EV_WAKE_ACTIVE(cur_thread),
- THREAD_INTERRUPTED);
- thread_unlock(thread);
- thread_unlock(cur_thread);
-@@ -1006,7 +1006,7 @@ kern_return_t thread_halt(
- */
- while ((thread->ast & AST_HALT) && (!(thread->state & TH_HALTED))) {
- thread->wake_active = TRUE;
-- thread_sleep((event_t) &thread->wake_active,
-+ thread_sleep(TH_EV_WAKE_ACTIVE(thread),
- simple_lock_addr(thread->lock), TRUE);
-
- if (thread->state & TH_HALTED) {
-@@ -1045,7 +1045,7 @@ kern_return_t thread_halt(
- s = splsched();
- thread_lock(thread);
- thread_ast_clear(thread, AST_HALT);
-- thread_wakeup_with_result((event_t)&thread->wake_active,
-+ thread_wakeup_with_result(TH_EV_WAKE_ACTIVE(thread),
- THREAD_INTERRUPTED);
- thread_unlock(thread);
- (void) splx(s);
-@@ -1284,7 +1284,7 @@ thread_dowait(
- * Check for failure if interrupted.
- */
- thread->wake_active = TRUE;
-- thread_sleep((event_t) &thread->wake_active,
-+ thread_sleep(TH_EV_WAKE_ACTIVE(thread),
- simple_lock_addr(thread->lock), TRUE);
- thread_lock(thread);
- if ((current_thread()->wait_result != THREAD_AWAKENED) &&
-@@ -1308,7 +1308,7 @@ thread_dowait(
- (void) splx(s);
-
- if (need_wakeup)
-- thread_wakeup((event_t) &thread->wake_active);
-+ thread_wakeup(TH_EV_WAKE_ACTIVE(thread));
-
- return ret;
- }
-@@ -1346,7 +1346,7 @@ kern_return_t thread_suspend(
- thread_lock(thread);
- /* Wait for thread to get interruptible */
- while (thread->state & TH_UNINT) {
-- assert_wait(&thread->state, TRUE);
-+ assert_wait(TH_EV_STATE(thread), TRUE);
- thread_unlock(thread);
- thread_block(NULL);
- thread_lock(thread);
-diff --git a/kern/thread.h b/kern/thread.h
-index d088c27..fbb7912 100644
---- a/kern/thread.h
-+++ b/kern/thread.h
-@@ -70,6 +70,21 @@ struct thread {
- task_t task; /* Task to which I belong */
- queue_chain_t thread_list; /* list of threads in task */
-
-+ /* Flags */
-+ /* The flags are grouped here, but documented at the original
-+ position. */
-+ union {
-+ struct {
-+ unsigned state:16;
-+ unsigned wake_active:1;
-+ unsigned vm_privilege:1;
-+ unsigned active:1;
-+ };
-+ event_t event_key;
-+#define TH_EV_WAKE_ACTIVE(t) ((event_t) (&(t)->event_key + 0))
-+#define TH_EV_STATE(t) ((event_t) (&(t)->event_key + 1))
-+ };
-+
- /* Thread bookkeeping */
- queue_chain_t pset_threads; /* list of all threads in proc set*/
-
-@@ -92,9 +107,10 @@ struct thread {
- kern_return_t wait_result; /* outcome of wait -
- may be examined by this thread
- WITHOUT locking */
-- boolean_t wake_active; /* someone is waiting for this
-+ /* Defined above */
-+ /* boolean_t wake_active; someone is waiting for this
- thread to become suspended */
-- int state; /* Thread state: */
-+ /* int state; Thread state: */
- /*
- * Thread states [bits or'ed]
- */
-@@ -129,7 +145,8 @@ struct thread {
- /* VM global variables */
-
- vm_offset_t recover; /* page fault recovery (copyin/out) */
-- boolean_t vm_privilege; /* Can use reserved memory? */
-+ /* Defined above */
-+ /* boolean_t vm_privilege; Can use reserved memory? */
-
- /* User-visible scheduling state */
- int user_stop_count; /* outstanding stops */
-@@ -194,7 +211,8 @@ struct thread {
- timer_elt_data_t depress_timer; /* timer for priority depression */
-
- /* Ast/Halt data structures */
-- boolean_t active; /* how alive is the thread */
-+ /* Defined above */
-+ /* boolean_t active; how alive is the thread */
- int ast; /* ast's needed. See ast.h */
-
- /* Processor data structures */