Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: baruch@ev-en.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 4/4]: Kill fastpath_{skb,cnt}_hint.
Date: Fri, 02 Mar 2007 22:22:50 -0800 (PST)	[thread overview]
Message-ID: <20070302.222250.41632359.davem@davemloft.net> (raw)
In-Reply-To: <20070301181340.GD25760@galon.ev-en.org>

From: Baruch Even <baruch@ev-en.org>
Date: Thu, 1 Mar 2007 20:13:40 +0200

> If you take this approach it makes sense to also remove the sorting of
> SACKs, the traversal of the SACK blocks will not start from the
> beginning anyway which was the reason for this sorting in the first
> place.
> 
> One drawback for this approach is that you now walk the entire sack
> block when you advance one packet. If you consider a 10,000 packet queue
> which had several losses at the beginning and a large sack block that
> advances from the middle to the end you'll walk a lot of packets for
> that one last stretch of a sack block.
> 
> One way to handle that is to use the still existing sack fast path to
> detect this case and calculate what is the sequence number to search
> for. Since you know what was the end_seq that was handled last, you can
> search for it as the start_seq and go on from there. Does it make sense?

Thanks for the feedback and these great ideas.

BTW, I think I figured out a way to get rid of
lost_{skb,cnt}_hint.  The fact of the matter in this case is that
the setting of the tag bits always propagates from front of the queue
onward.  We don't get holes mid-way.

So what we can do is search the RB-tree for high_seq and walk
backwards.  Once we hit something with TCPCB_TAGBITS set, we
stop processing as there are no earlier SKBs which we'd need
to do anything with.

Do you see any problems with that idea?

scoreboard_skb_hint is a little bit trickier, but it is a similar
case to the tcp_lost_skb_hint case.  Except here the termination
condition is a relative timeout instead of a sequence number and
packet count test.

Perhaps for that we can remember some state from the
tcp_mark_head_lost() we do first.  In fact, we can start
the queue walk from the latest packet which tcp_mark_head_lost()
marked with a tag bit.

Basically these two algorithms are saying:

1) Mark up to smallest of 'lost' or tp->high_seq.
2) Mark packets after those processed in #1 which have
   timed out.

Right?

  reply	other threads:[~2007-03-03  6:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 19:49 [PATCH 4/4]: Kill fastpath_{skb,cnt}_hint David Miller
2007-02-28 21:08 ` Stephen Hemminger
2007-02-28 21:12   ` David Miller
2007-03-01 18:13 ` Baruch Even
2007-03-03  6:22   ` David Miller [this message]
2007-03-03  8:12     ` Baruch Even
2007-03-03 11:45     ` Ilpo Järvinen
2007-03-03 12:27       ` Ilpo Järvinen

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=20070302.222250.41632359.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=baruch@ev-en.org \
    --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