From: Anton Mich <lp2s1h@gmail.com>
To: codel@lists.bufferbloat.net
Subject: [Codel] Fwd: count and rec_inv_sqrt initialization
Date: Fri, 6 Jul 2012 11:20:13 -0700 [thread overview]
Message-ID: <F7DBAC75-5122-4883-AE1F-DC1146F42E52@gmail.com> (raw)
In-Reply-To: <F9D3D1E7-53B0-48E3-BA63-A6ECC5E98B38@gmail.com>
I'm looking into the Codel implementation in Linux and the ns-2 and ns-3 simulation and found some inconsistency regarding the behavior of the count variable.
Specifically, in the ACM paper the count is decreased by 2 in the pseudocode (and ns-3 code) when re-entering a dropping state, in Linux the count is reduced to the difference of the current count minus the last count, and in ns-2 the count is reduced by 1. I assume that the most up to date version is that in linux but for me it's not very obvious why we set the value of the count like that, departing from the ACM paper intuition.
Also, when testing the Linux codel scheme I discovered the following behavior:
Because rec_inv_sqrt is initialized to 0, it remains 0 under some specific traffic patterns and that forces the interval/rec_inv_sqrt to a very small number, no matter what the actual count is. For this not to happen we have to enter the else statement that sets:
else {
vars->count = 1;
vars->rec_inv_sqrt = ~0U >> REC_INV_SQRT_SHIFT;
}
I found that this behavior is fixed when initializing rec_inv_sqrt like (reason being that when the newton step is first evaluated, the count is equal to 1, so we need a good guess of the rec_inv_sqrt):
@@ -166,6 +166,7 @@
static void codel_vars_init(struct codel_vars *vars)
{
memset(vars, 0, sizeof(*vars));
+ vars->rec_inv_sqrt = ~0U >> REC_INV_SQRT_SHIFT;
}
Has anybody encountered this behavior? Is this the correct fix?
Best,
Antonios
next prev parent reply other threads:[~2012-07-06 18:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 18:10 [Codel] " Anton Mich
2012-07-06 18:20 ` Anton Mich [this message]
2012-07-25 10:26 ` [Codel] Fwd: " Eric Dumazet
2012-07-26 23:47 ` Anton Mich
2012-07-27 5:12 ` Eric Dumazet
2012-07-27 20:09 ` Kathleen Nichols
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/codel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F7DBAC75-5122-4883-AE1F-DC1146F42E52@gmail.com \
--to=lp2s1h@gmail.com \
--cc=codel@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox