* [Cake] Heaps of cake
@ 2016-05-20 22:07 Jonathan Morton
2016-05-29 2:32 ` Jonathan Morton
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Morton @ 2016-05-20 22:07 UTC (permalink / raw)
To: cake
I’ve just pushed my latest set of updates, the main feature of which is the replacement of the linear search in cake_drop() with a heap structure. For efficiency, the heap is constructed the first time a packet drop is required (on overflow) and maintained incrementally thereafter until 64K packets have been delivered without an overflow occurring.
Please do hammer on these codepaths for all you’re worth. It compiles and survives a smoke-test, that’s all I know so far.
I also took the opportunity to remove a variable which was widely read but never written, except for initialisation. The number of queues per tin is thus now a compile-time constant. This should be an efficiency improvement, as well as removing magic numbers from a few places.
- Jonathan Morton
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cake] Heaps of cake
2016-05-20 22:07 [Cake] Heaps of cake Jonathan Morton
@ 2016-05-29 2:32 ` Jonathan Morton
2016-05-29 15:51 ` Kevin Darbyshire-Bryant
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Morton @ 2016-05-29 2:32 UTC (permalink / raw)
To: cake
> On 21 May, 2016, at 01:07, Jonathan Morton <chromatix99@gmail.com> wrote:
>
> Please do hammer on these codepaths for all you’re worth. It compiles and survives a smoke-test, that’s all I know so far.
Having noted a series of kernel panics in cake_drop(), I eventually traced the fault to dequeue_head(), which AFAIK hadn’t been touched since the first version (as it was lifted from fq_codel). If it’s called on en empty subqueue, it tried to read NULL->next.
The question remains why cake_drop() would select an empty subqueue as the longest one - evidently there’s a missing heap update somewhere. But at least now it won’t crash if that happens.
- Jonathan Morton
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cake] Heaps of cake
2016-05-29 2:32 ` Jonathan Morton
@ 2016-05-29 15:51 ` Kevin Darbyshire-Bryant
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Darbyshire-Bryant @ 2016-05-29 15:51 UTC (permalink / raw)
To: cake
On 29/05/16 03:32, Jonathan Morton wrote:
>
>> On 21 May, 2016, at 01:07, Jonathan Morton <chromatix99@gmail.com> wrote:
>>
>> Please do hammer on these codepaths for all you’re worth. It compiles and survives a smoke-test, that’s all I know so far.
>
> Having noted a series of kernel panics in cake_drop(), I eventually traced the fault to dequeue_head(), which AFAIK hadn’t been touched since the first version (as it was lifted from fq_codel). If it’s called on en empty subqueue, it tried to read NULL->next.
>
> The question remains why cake_drop() would select an empty subqueue as the longest one - evidently there’s a missing heap update somewhere. But at least now it won’t crash if that happens.
>
> - Jonathan Morton
Pointed my build at the latest code, so far no unexpected out-to-lunch
moments :-)
Thanks for continuing to work on making things stable again.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-29 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 22:07 [Cake] Heaps of cake Jonathan Morton
2016-05-29 2:32 ` Jonathan Morton
2016-05-29 15:51 ` Kevin Darbyshire-Bryant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox