[tor-commits] [tor/master] sched: Avoid adding the same channel twice to the KIST pending list

nickm at torproject.org nickm at torproject.org
Thu Feb 1 22:07:35 UTC 2018


commit adaf3e9b89f62d68ab631b8f672d9bff996689b9
Author: David Goulet <dgoulet at torproject.org>
Date:   Wed Jan 31 13:46:31 2018 -0500

    sched: Avoid adding the same channel twice to the KIST pending list
    
    This is the quick fix that is keeping the channel in PENDING state so if we
    ever try to reschedule the same channel, it won't happened.
    
    Fixes #24700
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 changes/bug24700        | 4 ++++
 src/or/scheduler_kist.c | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/changes/bug24700 b/changes/bug24700
new file mode 100644
index 000000000..74dc581a0
--- /dev/null
+++ b/changes/bug24700
@@ -0,0 +1,4 @@
+  o Minor bugfixes (scheduler, KIST):
+    - Avoid adding the same channel twice in the KIST scheduler pending list
+      wasting CPU cycles at handling the same channel twice. Fixes bug 24700;
+      bugfix on 0.3.2.1-alpha.
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
index f50f3aa9e..7b5d138be 100644
--- a/src/or/scheduler_kist.c
+++ b/src/or/scheduler_kist.c
@@ -693,7 +693,6 @@ kist_scheduler_run(void)
        * after the scheduling loop is over. They can hopefully be taken care of
        * in the next scheduling round.
        */
-      chan->scheduler_state = SCHED_CHAN_WAITING_TO_WRITE;
       if (!to_readd) {
         to_readd = smartlist_new();
       }





More information about the tor-commits mailing list