Skip to content
Commit 73d0f37a authored by Vasily Averin's avatar Vasily Averin Committed by David S. Miller
Browse files

cbq: incorrectly low bandwidth setting blocks limited traffic



Mainstream commit f0f6ee1f ("cbq: incorrect processing of high limits")
have side effect: if cbq bandwidth setting is less than real interface
throughput non-limited traffic can delay limited traffic for a very long time.

This happen because of q->now changes incorrectly in cbq_dequeue():
in described scenario L2T is much greater than real time delay,
and q->now gets an extra boost for each transmitted packet.

Accumulated boost prevents update q->now, and blocked class can wait
very long time until (q->now >= cl->undertime) will be true again.

To fix the problem the patch updates q->now on each cbq_update() call.
L2T-related pre-modification q->now was moved to cbq_update().

My testing confirmed that it fixes the problem and did not discover
any side-effects

Fixes: f0f6ee1f ("cbq: incorrect processing of high limits")

Signed-off-by: default avatarVasily Averin <vvs@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ac32c7f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment