[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090203122535.GB8633@1wt.eu>
Date: Tue, 3 Feb 2009 13:25:35 +0100
From: Willy Tarreau <w@....eu>
To: Evgeniy Polyakov <zbr@...emap.net>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Jarek Poplawski <jarkao2@...il.com>,
David Miller <davem@...emloft.net>, dada1@...mosbay.com,
ben@...s.com, mingo@...e.hu, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, jens.axboe@...cle.com
Subject: Re: [PATCH v2] tcp: splice as many packets as possible at once
On Tue, Feb 03, 2009 at 03:18:36PM +0300, Evgeniy Polyakov wrote:
> On Tue, Feb 03, 2009 at 11:12:09PM +1100, Herbert Xu (herbert@...dor.apana.org.au) wrote:
> > The only change we need to make is at receive time. Instead of
> > always pushing the received skb into the stack, we should try to
> > allocate a linear replacement skb, and if that fails, allocate
> > a fragmented skb and copy the data into it. That way we can
> > always push a linear skb back into the ring buffer.
>
> Yes, that's was the part about 'reserve' buffer for the sockets you cut
> :)
>
> I agree that this will work and will be better than nothing, but copying
> 9kb into 3 pages is rather CPU hungry operation, and I think (but have
> no numbers though) that system will behave faster if MTU is reduced to
> the standard one.
Well, FWIW, I've always observed better performance with 4k MTU (4080 to
be precise) than with 9K, and I think that the overhead of allocating 3
contiguous pages is a major reason for this.
> Another solution is to have a proper allocator which will be able to
> defragment the data, if talking about the alternatives to the drop.
>
> So:
> 1. copy the whole jumbo skb into fragmented one
> 2. reduce the MTU
you'll not reduce MTU of established connections though. And trying to
advertise MSS changes in the middle of a TCP connection is an awful
hack which I think will not work everywhere.
> 3. rely on the allocator
>
> For the 'good' hardware and drivers nothing from the above is really needed.
>
> --
> Evgeniy Polyakov
Willy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists