From: linux@horizon.com
To: netdev@vger.kernel.org
Cc: linux@horizon.com
Subject: Re: SACK scoreboard
Date: 9 Jan 2008 01:04:09 -0500 [thread overview]
Message-ID: <20080109060409.18161.qmail@science.horizon.com> (raw)
Just some idle brainstorming on the subject...
It seems the only way to handle network pipes sigificantly larger (delay *
bandwidth product) than the processor cache is to make freeing retransmit
data o(n).
Now, there are some ways to reduce the constant factor. The one that
comes to mind first is to not queue sk_buffs. Throw away the struct
sk_buff after transmission and just queue skb_frag_structs, pages, or
maybe even higher-order pages of data. Then freeing the data when it's
acked has a much smaller constant factor, particularly d-cache footprint,
and no slab operations.
The downside is more work to recreate the skb if you do have to
retransmit, but optimizing for retransmits is silly.
Some implementations could leave large chunks of memory locked until
all of the sk_buff->skb_shared_info->skb_frag_structs referencing them
have gone away, but you can look at the transmit window when deciding
how big a chunk size to use.
Then, to actually get below O(n), you want to keep the queued data in
a data structure known to the memory manager. Basically, splice the
retransmit queue onto the free list.
It may require some kludgery in the memory manager. In particular, doing
that in O(1) time obviously means that you can't coalesce adjacent free
regions to build higher-order pages. So you'd have to have a threshold
for uncoalesced pages and a way to force coalescing under memory pressure.
You're just deferring work until the page is allocated, but the point
is that then it's okay to bring it into cache when it's about to be
used again. It's the redundant round trip just because an ack arrived
that's annoying.
I've done thins sort of thing with specialized fixed-block-size allocators
before (an alpha-beta minimax search tree allocates nodes one at a
time, but frees whole subtrees at once), but might it be feasible for
kernel use?
next reply other threads:[~2008-01-09 6:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 6:04 linux [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-11 11:59 [RFC PATCH net-2.6.25 uncompilable] [TCP]: Avoid breaking GSOed skbs when SACKed one-by-one (Was: Re: [RFC] TCP illinois max rtt aging) Ilpo Järvinen
2007-12-11 12:32 ` [RFC PATCH net-2.6.25 uncompilable] [TCP]: Avoid breaking GSOed skbs when SACKed one-by-one David Miller
2007-12-15 9:51 ` SACK scoreboard (Was: Re: [RFC PATCH net-2.6.25 uncompilable] [TCP]: Avoid breaking GSOed skbs when SACKed one-by-one) Ilpo Järvinen
2008-01-08 7:36 ` SACK scoreboard David Miller
2008-01-08 12:12 ` Ilpo Järvinen
2008-01-09 7:58 ` David Miller
2008-01-08 16:51 ` John Heffner
2008-01-08 22:44 ` David Miller
2008-01-09 1:34 ` Lachlan Andrew
2008-01-09 6:35 ` David Miller
2008-01-09 2:25 ` Andi Kleen
2008-01-09 4:27 ` John Heffner
2008-01-09 6:41 ` David Miller
2008-01-09 14:56 ` John Heffner
2008-01-09 18:14 ` SANGTAE HA
2008-01-09 18:23 ` John Heffner
2008-01-09 12:55 ` Ilpo Järvinen
2008-01-09 6:39 ` David Miller
2008-01-09 7:03 ` Andi Kleen
2008-01-09 7:16 ` David Miller
2008-01-09 9:47 ` Evgeniy Polyakov
2008-01-09 14:02 ` Andi Kleen
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=20080109060409.18161.qmail@science.horizon.com \
--to=linux@horizon.com \
--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;
as well as URLs for NNTP newsgroup(s).