Re: [PATCH] tcp: splice as many packets as possible at once

From: Herbert Xu
Date: Wed Jan 14 2009 - 06:29:06 EST


On Wed, Jan 14, 2009 at 01:29:19AM -0800, David Miller wrote:
>
> It's a simple fix, but as Herbert stated it leaves other ->sendpage()
> implementations exposed to data corruption when the from side of the
> pipe buffer is a socket.
>
> That, to me, is almost worse than a bad fix.

Yep, so far nobody has verified the disk path at all. So for all
we know, if there is a delay on the way to disk, the exact same
thing can occur.

Besides, the PageSlab thing is going to copy for network to network
anyway.

> So, I've put together a full commit message and Jarek's patch
> below. One thing I notice is that the silly skb_clone() done
> by SKB splicing is no longer necessary.
>
> We could get rid of that to offset (some) of the cost we are
> adding with this bug fix.
>
> Comments?

Yes that's probably a good idea.

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/