[tor-commits] [tor/master] Separate the flags for logging use bias.

nickm at torproject.org nickm at torproject.org
Thu Feb 7 19:31:32 UTC 2013


commit b03553737cdfa460d33a425a53908c83fe871ec4
Author: Mike Perry <mikeperry-git at fscked.org>
Date:   Mon Feb 4 16:59:28 2013 -0800

    Separate the flags for logging use bias.
    
    I think we want both sets of messages to appear independently to help us know
    what needs tuning.
---
 src/or/circuitbuild.c |    8 ++++----
 src/or/entrynodes.h   |    4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index e94daca..26edccd 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2273,8 +2273,8 @@ pathbias_measure_use_rate(entry_guard_t *guard)
           entry_guards_changed();
           return;
         }
-      } else if (!guard->path_bias_extreme) {
-        guard->path_bias_extreme = 1;
+      } else if (!guard->path_bias_use_extreme) {
+        guard->path_bias_use_extreme = 1;
         log_warn(LD_CIRC,
                  "Your Guard %s=%s is failing to carry an extremely large "
                  "amount of streams on its circuits. "
@@ -2297,8 +2297,8 @@ pathbias_measure_use_rate(entry_guard_t *guard)
       }
     } else if (pathbias_get_use_success_count(guard)/guard->use_attempts
                < pathbias_get_notice_use_rate(options)) {
-      if (!guard->path_bias_noticed) {
-        guard->path_bias_noticed = 1;
+      if (!guard->path_bias_use_noticed) {
+        guard->path_bias_use_noticed = 1;
         log_notice(LD_CIRC,
                  "Your Guard %s=%s is failing to carry more streams on its "
                  "circuits than usual. "
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index e6c973c..b673d02 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -39,6 +39,10 @@ typedef struct entry_guard_t {
                                        * bias for this node already? */
   unsigned int path_bias_disabled : 1; /**< Have we disabled this node because
                                         * of path bias issues? */
+  unsigned int path_bias_use_noticed : 1; /**< Did we alert the user about path
+                                       * use bias for this node already? */
+  unsigned int path_bias_use_extreme : 1; /**< Did we alert the user about path
+                                       * use bias for this node already? */
   unsigned int is_dir_cache : 1; /**< Is this node a directory cache? */
   time_t bad_since; /**< 0 if this guard is currently usable, or the time at
                       * which it was observed to become (according to the





More information about the tor-commits mailing list