Re: [PATCH v2] tcp: splice as many packets as possible at once
From: Herbert Xu
Date: Tue Feb 03 2009 - 07:28:26 EST
On Tue, Feb 03, 2009 at 03:18:36PM +0300, Evgeniy Polyakov wrote:
>
> 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.
Reducing the MTU can create all sorts of problems so it should be
avoided if at all possible. These days, path MTU discovery is
haphazard at best. In fact MTU problems are the main reason why
jumbo frames simply don't get deployed.
> Another solution is to have a proper allocator which will be able to
> defragment the data, if talking about the alternatives to the drop.
Sure, if we can create an allocator that can guarantee contiguous
allocations all the time then by all means go for it. But until
we get there, doing what I suggested is way better than stopping
the receiving process altogether.
> So:
> 1. copy the whole jumbo skb into fragmented one
> 2. reduce the MTU
> 3. rely on the allocator
Yes, improving the allocator would obviously inrease the performance,
however, there is nothing against employing both methods. I'd
always avoid reducing the MTU at run-time though.
> For the 'good' hardware and drivers nothing from the above is really needed.
Right, that's why there is a point beyond which improving the
allocator is no longer worthwhile.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/