From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.taht.net (mail.taht.net [176.58.107.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 7D4F23B2A4 for ; Tue, 21 Nov 2017 14:04:32 -0500 (EST) Received: from nemesis.taht.net (unknown [IPv6:2603:3024:1536:86f0:2e0:4cff:fec1:1206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.taht.net (Postfix) with ESMTPSA id 4C32E21341; Tue, 21 Nov 2017 19:04:31 +0000 (UTC) From: Dave Taht To: Jonathan Morton Cc: cake@lists.bufferbloat.net References: <1510945885-9986-1-git-send-email-dave.taht@gmail.com> <1510945885-9986-3-git-send-email-dave.taht@gmail.com> <8760a81y3s.fsf@nemesis.taht.net> Date: Tue, 21 Nov 2017 11:04:29 -0800 In-Reply-To: (Jonathan Morton's message of "Tue, 21 Nov 2017 00:21:30 +0200") Message-ID: <87po8btpvm.fsf@nemesis.taht.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Cake] [RFC PATCH 2/3] Add cake related includes and source files X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 19:04:32 -0000 Jonathan Morton writes: > On 17/11/17 21:52, Dave Taht wrote: >>> + schedule = now - vars->drop_next; > >> I don't understand the schedule concept that well. Kind of goes with not >> understanding the overloading of the drop_next field. > > The 'schedule' variable simply records, in its sign, whether 'now' is before or > after 'drop_next'. This allows 'drop_next' to be updated before the next > scheduling decision is actually branched, without destroying that information. > Similarly, the first 'schedule' value calculated is preserved in the boolean > 'next_due'. > > As for 'drop_next', I'm simply taking advantage of the fact that 'interval' is > both the delay between first exceeding 'target' and the first signalling event, > *and* the scaling factor for the signalling frequency. It's therefore very > natural to use a single mechanism for both purposes, and eliminates a > significant amount of reference Codel's spaghetti code. To help with this, both > the '0' and '1' entries in the invsqrt cache are 0xFFFFFFFF, as close as > possible to 1.0 in fixed-point. These are worthy comments to have in the code.