diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-17 18:20:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-17 18:20:03 -0400 |
commit | 47df912f1c5a8783fb6edafc72b044ec0ae774ec (patch) | |
tree | 8688b10542b2ca6532ba1e86f5e18caa0a62be0e /changes/bug25373 | |
parent | 780d1b44cf24ad8ef321b99d8fc591f110456f98 (diff) | |
download | tor-47df912f1c5a8783fb6edafc72b044ec0ae774ec.tar.gz tor-47df912f1c5a8783fb6edafc72b044ec0ae774ec.zip |
Remove the periodic refill event entirely.
Now that we update our buckets on demand before reading or writing,
we no longer need to update them all every TokenBucketRefillInterval
msec.
When a connection runs out of bandwidth, we do need a way to
reenable it, however. We do this by scheduling a timer to reenable
all blocked connections for TokenBucketRefillInterval msec after a
connection becomes blocked.
(If we were using PerConnBWRate more, it might make sense to have a
per-connection timer, rather than a single timeout. But since
PerConnBWRate is currently (mostly) unused, I'm going to go for the
simpler approach here, since usually whenever one connection has
become blocked on bandwidth, most connections are blocked on
bandwidth.)
Implements ticket 25373.
Diffstat (limited to 'changes/bug25373')
-rw-r--r-- | changes/bug25373 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/changes/bug25373 b/changes/bug25373 new file mode 100644 index 0000000000..03e870e692 --- /dev/null +++ b/changes/bug25373 @@ -0,0 +1,7 @@ + o Major features (main loop, CPU wakeup): + - The bandwidth-limitation logic has been refactored so that + bandwidth calculations are performed on-demand, rather than + every TokenBucketRefillInterval milliseconds. + This change should improve the granularity of our bandwidth + calculations, and limit the number of times that the Tor process needs + to wake up when it is idle. Closes ticket 25373. |