[Cake] [RFC PATCH 2/3] Add cake related includes and source files

Dave Taht dave at taht.net
Tue Nov 21 14:04:29 EST 2017

Jonathan Morton <chromatix99 at gmail.com> 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.

More information about the Cake mailing list