[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120604181636.GG32205@redhat.com>
Date: Mon, 4 Jun 2012 21:16:37 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Willy Tarreau <w@....eu>, David Miller <davem@...emloft.net>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: netdev_alloc_skb() use build_skb()
On Mon, Jun 04, 2012 at 07:44:50PM +0200, Eric Dumazet wrote:
> On Mon, 2012-06-04 at 20:20 +0300, Michael S. Tsirkin wrote:
>
> > I see. virtio allocates full 4K pages which works well for GSO
> > but it means smaller packets would get large truesize
> > wasting lots of memory.
> > So maybe we should keep copying packets < 128 bytes.
>
> Yet, but restrict the copy to bare minimum if > 128 bytes
>
> See following commit for details (actual changelog bigger than patch
> itself)
>
> commit 56138f50d1900b0c3d8647376e37b488b23ba53d
> Author: Eric Dumazet <edumazet@...gle.com>
> Date: Fri May 18 04:48:33 2012 +0000
>
> iwlwifi: dont pull too much payload in skb head
>
> As iwlwifi use fat skbs, it should not pull too much data in skb->head,
> and particularly no tcp data payload, or splice() is slower, and TCP
> coalescing is disabled. Copying payload to userland also involves at
> least two copies (part from header, part from fragment)
>
> Each layer will pull its header from the fragment as needed.
>
> (on 64bit arches, skb_tailroom(skb) at this point is 192 bytes)
>
> With this patch applied, I have a major reduction of collapsed/pruned
> TCP packets, a nice increase of TCPRcvCoalesce counter, and overall
> better Internet User experience.
>
> Small packets are still using a fragless skb, so that page can be reused
> by the driver.
>
Will take a look, thanks.
By the way, this comment at build_skb:
* @frag_size: size of fragment, or 0 if head was kmalloced
is not very clear to me. Could you clarify what exactly size
of fragment means in this context?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists