From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 3962B2008E8 for ; Thu, 26 Jul 2012 22:13:04 -0700 (PDT) Received: by wgbfa7 with SMTP id fa7so1912016wgb.28 for ; Thu, 26 Jul 2012 22:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=re9u4589t5xzUZCGRc1+Ya5DY4PG1OXS2h0W3SD6fGs=; b=M/ylwcyC1P7mh+C+1VA7dd5JHBYFbC+GD5ov5vDSPC++/kWnoMiciTIsHYCcMH4nkU lvFHKB2hfMsd7I02icTmiferGzBeCcJRWzeyNMPSt0iKVaIfj6A3e1FpzCU23s592fT9 R36gYkGytK9/Sa25XJ9eKzspxKBgQA9ii6qi/yYW6sgFEdrSvG82n6MJQUTXVfDvU07G yq8tDt4OSoCmNo29A5GFBNB902SJxJwdxSm71aG5TRlDfOdd3R5ozpfICUbk4ARNYLlE H5go2u7c9zcCJYpkCKRFrfYdTDyLbRAgC9LrPN+/utBsvodEjn+9a9W7oHA6+d6aaiw4 +KHg== Received: by 10.216.131.22 with SMTP id l22mr530611wei.96.1343365982858; Thu, 26 Jul 2012 22:13:02 -0700 (PDT) Received: from [172.28.90.169] ([74.125.122.49]) by mx.google.com with ESMTPS id j6sm3628016wiy.4.2012.07.26.22.13.00 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 22:13:01 -0700 (PDT) From: Eric Dumazet To: Anton Mich In-Reply-To: <5D281805-E7EE-4852-B10F-DDF7A1E3677A@gmail.com> References: <1343211979.2626.11148.camel@edumazet-glaptop> <5D281805-E7EE-4852-B10F-DDF7A1E3677A@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 27 Jul 2012 07:12:56 +0200 Message-ID: <1343365976.2626.12171.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: codel@lists.bufferbloat.net Subject: Re: [Codel] Fwd: count and rec_inv_sqrt initialization X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 05:13:05 -0000 On Thu, 2012-07-26 at 16:47 -0700, Anton Mich wrote: > Hi Eric, > > Thanks for looking into this! > May I also ask what is the intuition behind using this delta (which > is, in my understanding, equal to the number of drops between the > lastcount and the current count) as the new count value? I tried to > track down in the codel list when this changed from what's in the > paper, pseudocode and NS-2 to what is now in Linux but I didn't find > anything. > Kathleen & Van are still discussing of what should be exactly done here. The delta idea came from them, at a moment no public discussion was happening (before publication, we were privately implementing codel) Before the delta, we had following codes : Version v1 -> v6 : (05/03/2012 -> 05/05/2012) + if (now.tv64 - q->drop_next.tv64 < + 16 * q->interval.tv64) { + int c = q->count - 1; + q->count = c < 1 ? 1 : c; + } else { + q->count = 1; + } But count was growing and was not going back to lower values I suggested to use instead : if (now - drop_next< 16.*interval) { unsigned int c = q->count >> 1; count = c < 1 ? 1 : c; else { count = 1; } Then we also tried c = min(q->count - 1, q->count - (q->count>>4)); (Dave even had a module param :) static u32 count_rescale(struct codel_sched_data *q, codel_time_t now) { s32 c = 1; if (codel_time_after(now - q->drop_next, 16 * q->interval)) { switch(decrease_method) { case 3: break; case 2: /* Dumazet 2 */ c = q->count >> 1; break; case 1: /* Dumazet 1 */ c = min(q->count - 1, q->count - (q->count >> 4)); break; case 0: /* Codel Paper Default */ default: c = q->count - 1; } c = max(1U, c); } return (u32) c; } in v13 ( 05/10/2012) we had the current form But codel is not finalized ;)