diff options
author | Andrea Shepard <andrea@torproject.org> | 2013-11-14 04:45:47 -0800 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2014-09-30 22:49:35 -0700 |
commit | 1275002a46dfb131f6db5c0fe28bc1828db327e2 (patch) | |
tree | ee0377d0be78e6ac2cb8c4d7bd445c1856b02618 /src/or/channel.c | |
parent | 4f567c8cc8cd68a8ca9bb93fc57d518d7eb55cf0 (diff) | |
download | tor-1275002a46dfb131f6db5c0fe28bc1828db327e2.tar.gz tor-1275002a46dfb131f6db5c0fe28bc1828db327e2.zip |
Schedule according to a queue size heuristic
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index dddd7ab1f1..7ed38945ba 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -4563,6 +4563,8 @@ channel_update_xmit_queue_size(channel_t *chan) U64_FORMAT ", new size is " U64_FORMAT, U64_PRINTF_ARG(adj), U64_PRINTF_ARG(chan->global_identifier), U64_PRINTF_ARG(estimated_total_queue_size)); + /* Tell the scheduler we're increasing the queue size */ + scheduler_adjust_queue_size(chan, 1, adj); } } else if (queued < chan->bytes_queued_for_xmit) { adj = chan->bytes_queued_for_xmit - queued; @@ -4585,6 +4587,8 @@ channel_update_xmit_queue_size(channel_t *chan) U64_FORMAT ", new size is " U64_FORMAT, U64_PRINTF_ARG(adj), U64_PRINTF_ARG(chan->global_identifier), U64_PRINTF_ARG(estimated_total_queue_size)); + /* Tell the scheduler we're decreasing the queue size */ + scheduler_adjust_queue_size(chan, -1, adj); } } } |