netdev
[Top] [All Lists]

Re: design for TSO performance fix

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: design for TSO performance fix
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 1 Feb 2005 15:04:30 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20050128015751.GT31837@postel.suug.ch>
References: <20050127163146.33b01e95.davem@davemloft.net> <20050128015751.GT31837@postel.suug.ch>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 28 Jan 2005 02:57:51 +0100
Thomas Graf <tgraf@xxxxxxx> wrote:

> > static inline int tcp_skb_data_all_paged(struct sk_buff *skb)
> > {
> >     return (skb->len == skb->data_len);
> > }
> 
> You could also define this as (skb_headlen(skb) == 0)

Good point, I'll do it that way.

> I assume the case when reroute changes oif to a device no
> longer capable of SG+CSUM stays the same and the skb remains
> paged until dev_queue_xmit?

That's correct.  The only difference is that the TSO building
path of send queue transmit will not be executed.

I'm slowly piecing together an implementation.  The most non-
trivial aspect is the frame pushing logic.  While building the
queue from userspace, we wish to defer until either 1) the user
will not supply more data or 2) there is enough in the send
queue for an optimally sized TSO frame to be built.

For the curious, there is attached my current state of implementation.
It's very raw, but it starts to give the basic ideas.  The first
attachment are the design notes I've been jotting down casually
while thinking about this, and the second is the rough beginnings
of a patch.

The patch implements the tp->tso_goal calculations, and the TSO
segmentizer, but nothing else.  The missing pieces are:

1) the push-pending-frames logic, it requires the most thought
1.5) the code in tcp_write_xmit() that tries to call the TSO
     segmenter with groups of SKBs to send
2) killing of tp->mss_cache_std, use tp->mss_cache for everything
3) kill all the code disabling TSO during packet drops
4) kill all the pcount stuff

I'll continue trying to make more progress with this thing.

Attachment: tcp_tso.txt
Description: Text document

Attachment: diff
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • Re: design for TSO performance fix, David S. Miller <=