netdev
[Top] [All Lists]

Re: [DEBUG]: sk_forward_alloc assertion failures

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [DEBUG]: sk_forward_alloc assertion failures
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 15 Jan 2005 09:47:45 +1100
Cc: anton@xxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20050114140426.5cf06f0c.davem@davemloft.net>
References: <20050113201914.46b7c4a2.davem@davemloft.net> <20050114111648.GA27964@gondor.apana.org.au> <20050114120322.GA28449@gondor.apana.org.au> <20050114110352.23c94ab9.davem@davemloft.net> <20050114203452.GA1277@gondor.apana.org.au> <20050114132757.4ca3153a.davem@davemloft.net> <20050114213829.GA12454@gondor.apana.org.au> <20050114133611.69ff0bb2.davem@davemloft.net> <20050114215504.GA12569@gondor.apana.org.au> <20050114140426.5cf06f0c.davem@davemloft.net>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Fri, Jan 14, 2005 at 02:04:26PM -0800, David S. Miller wrote:
> 
> I see, but we don't want sendmsg() to charge a full MSS if the
> user is only writing 10 bytes of data onto the wire.  That seems
> to be what happens if we implement things the way you are suggesting.

Yes you're right.  Although I belive it only happens in the case of
sendpages().  It will allocate more memory than what's required in
that case.  I'd say that it should be rare to have a 10 byte packet with
sendfile() though.

However, it's not all that difficult to fix up either.  We can adjust
truesize to a more reasonable value in tcp_write_xmit().  Something
like this will do.

Actually it happens in the case of sendmsg() too.  Unfortunately in
that case we can't do a thing about it since the memory is allocated
between skb->head and skb->tail.

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

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>