From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net
Subject: Re: [Cake] [PATCH net-next v9 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc
Date: Mon, 14 May 2018 20:31:02 +0200 [thread overview]
Message-ID: <87efiew0m1.fsf@toke.dk> (raw)
In-Reply-To: <20180514.110558.392362320880673775.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> From: Toke Høiland-Jørgensen <toke@toke.dk>
> Date: Mon, 14 May 2018 11:08:28 +0200
>
>> David Miller <davem@davemloft.net> writes:
>>
>>> From: Toke Høiland-Jørgensen <toke@toke.dk>
>>> Date: Tue, 08 May 2018 16:34:19 +0200
>>>
>>>> +struct cake_flow {
>>>> + /* this stuff is all needed per-flow at dequeue time */
>>>> + struct sk_buff *head;
>>>> + struct sk_buff *tail;
>>>
>>> Please do not invent your own SKB list handling mechanism.
>>
>> We didn't invent it, we inherited it from fq_codel. I was actually about
>> to fix that, but then I noticed it was still around in fq_codel, and so
>> let it be. I can certainly fix it anyway, but, erm, why is it acceptable
>> in fq_codel but not in cake? struct sk_buff_head is not that new, is it?
>
> I guess one argument has to do with the amount of memory consumed by this
> per-flow or per-queue information, right? Because the skb queue head has
> a qlen and a spinlock regardless of whether they are used or not.
>
> Furthermore, if you use the __skb_insert() et al. helpers, even though it
> won't use the lock it will adjust the qlen counter. And that's useless
> work since you have no use for the qlen value.
I think the useless work issue is larger than the memory usage. When
running this (or FQ-CoDel) on small memory-constrained routers, we've
mostly had issues with OOM because of the packet data, which dwarfs the
per-queue overhead.
> Taken together, it seems that what you and fq_codel are doing is not
> such a bad idea after all. So please leave it alone.
OK. I'll just resend with prettier Christmas trees, then :)
> On-and-off again, I've looked into converting skbs to using list_head
> but it's a non-trivial set of work. All over the tree the different
> layers use the next/prev pointers in different ways. Some use it for a
> doubly linked list. Some use it for a singly linked list. Some encode
> state in the prev pointer. You name it, it's out there.
>
> I'll try to get back to that task because obviously it'll be useful to
> have code like cake and fq_codel use common helpers instead of custom
> stuff.
Yup, I agree. From a code readability point of view, I also prefer the
helpers.
-Toke
next prev parent reply other threads:[~2018-05-14 18:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 14:34 [Cake] [PATCH net-next v9 0/7] " Toke Høiland-Jørgensen
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 3/7] sch_cake: Add optional ACK filter Toke Høiland-Jørgensen
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc Toke Høiland-Jørgensen
2018-05-14 0:09 ` David Miller
2018-05-14 9:08 ` Toke Høiland-Jørgensen
2018-05-14 15:05 ` David Miller
2018-05-14 18:31 ` Toke Høiland-Jørgensen [this message]
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 6/7] sch_cake: Add overhead compensation support to the rate shaper Toke Høiland-Jørgensen
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 2/7] sch_cake: Add ingress mode Toke Høiland-Jørgensen
2018-05-08 14:59 ` Sebastian Moeller
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 5/7] sch_cake: Add DiffServ handling Toke Høiland-Jørgensen
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 4/7] sch_cake: Add NAT awareness to packet classifier Toke Høiland-Jørgensen
2018-05-08 14:34 ` [Cake] [PATCH net-next v9 7/7] sch_cake: Conditionally split GSO segments Toke Høiland-Jørgensen
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/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efiew0m1.fsf@toke.dk \
--to=toke@toke.dk \
--cc=cake@lists.bufferbloat.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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