bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed mach 1/2] kern: avoid #if 0ing out thread_collect_scan


From: Justus Winter
Subject: [committed mach 1/2] kern: avoid #if 0ing out thread_collect_scan
Date: Fri, 20 Feb 2015 18:48:07 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]