From 1275002a46dfb131f6db5c0fe28bc1828db327e2 Mon Sep 17 00:00:00 2001 From: Andrea Shepard Date: Thu, 14 Nov 2013 04:45:47 -0800 Subject: Schedule according to a queue size heuristic --- src/or/channel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/or/channel.c') 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); } } } -- cgit v1.2.3-54-g00ecf