From: "David S. Miller" <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: netdev@oss.sgi.com
Subject: Re: issue with new TCP TSO stuff
Date: Thu, 12 May 2005 16:24:26 -0700 (PDT) [thread overview]
Message-ID: <20050512.162426.75782784.davem@davemloft.net> (raw)
In-Reply-To: <20050512231038.GA22440@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: issue with new TCP TSO stuff
Date: Fri, 13 May 2005 09:10:38 +1000
> However, I think you're right that this does have some fundamental
> overheads compared to the existing TSO code which we can't remove.
>
> More specifically, the existing TSO code really does avoid
> segmentation in that no MTU-sized skb's are allocated unless
> the congestion window requires that to be done. The new code
> will always allocate MTU-sized skb's no matter what.
>
> The ideal solution should bring the best of both worlds :) That is,
> no segmentation on output unless required by the congestion window,
> while at the same time avoiding the tcp_skb_pcount logic.
Right.
Ok, the two true downfalls of the current TSO code are:
1) It does not attempt to predict what the CWND will
be at packet output time. So smaller than ideal
TSO frames are built.
2) Packet loss is not handled gracefully, in fact TSO
is disabled when this happens :-)
So, I'm mentioning this because it may end up being better to try and
solve those two problems instead of going to my new stuff.
#2 could be handled by down-sizing TSO frames when packet loss occurs.
Ie. tcp_retransmit_skb() or whatever will segmentize a TSO packet
which is within the sequence it is trying to retransmit. Implementing
this is non- trivial mostly due to the fact that it has to work handle
GFP_ATOMIC memory failures and also get all the pcount crap correct.
#1 is more tricky, and is the main reason I explored the "TSO
Reloaded" idea. I wonder if we could just build enormous TSO frames
_always_. We pass down these huge things to the output path, with a
struct sk_buff local offset and size. That way, if the packet is too
large for the congestion window, we're fine, we just set the offset
and size appropriately. I think the tcp_snd_test() simplifications
made by my TSO Reloaded patch would help a lot here. The send test is
logically now split to it's two tests 1) whether to send anything at
all, and 2) once #1 passes, how many such packets.
This would be a sort of super-TSO that would do less segmenting work
than even a "perfect" TSO segmenter would.
I'm still not sure which approach is best, just throwing around some
ideas.
next prev parent reply other threads:[~2005-05-12 23:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-12 5:30 issue with new TCP TSO stuff David S. Miller
2005-05-12 10:05 ` Herbert Xu
2005-05-12 20:13 ` David S. Miller
2005-05-12 21:47 ` Herbert Xu
2005-05-12 22:10 ` Herbert Xu
2005-05-12 22:52 ` David S. Miller
2005-05-12 23:10 ` Herbert Xu
2005-05-12 23:24 ` David S. Miller [this message]
2005-05-12 23:52 ` Herbert Xu
2005-05-13 4:36 ` David S. Miller
2005-05-13 13:25 ` Herbert Xu
2005-05-12 22:46 ` David S. Miller
2005-05-12 14:13 ` Andi Kleen
2005-05-12 19:26 ` David S. Miller
[not found] ` <20050512200251.GA72662@muc.de>
2005-05-12 20:03 ` David S. Miller
2005-05-12 20:26 ` Andi Kleen
2005-05-12 22:34 ` David S. Miller
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050512.162426.75782784.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).