[PATCH v2 0/4] Defer skb allocation for both mergeable buffers and big packets in virtio_net

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shirley Ma
Date: Friday, December 11, 2009 - 5:28 am

This is a patch-set for deferring skb allocation based on Rusty and
Michael's inputs.

Guest virtio_net receives packets from its pre-allocated vring 
buffers, then it delivers these packets to upper layer protocols
as skb buffs. So it's not necessary to pre-allocate skb for each
mergable buffer, then frees it when it's useless. 

This patch has deferred skb allocation when receiving packets for
both big packets and mergeable buffers. It reduces skb pre-allocations 
and skb_frees.

A destroy function has been created to push virtio free buffs to vring
for unused pages, and used page private to maintain page list.

This patch has tested and measured against 2.6.32-rc7 git. It is built
again 2.6.32 kernel. Tests have been done for small packets, big packets
and mergeable buffers.

The single netperf TCP_STREAM performance improved for host to guest. 
It also reduces UDP packets drop rate.

Thanks
Shirley

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/1] Defer skb allocation for both mergeable bu ..., Michael S. Tsirkin, (Tue Dec 8, 5:21 am)
[PATCH v2 0/4] Defer skb allocation for both mergeable buf ..., Shirley Ma, (Fri Dec 11, 5:28 am)
Re: [PATCH v2 0/4] Defer skb allocation for both mergeable ..., Michael S. Tsirkin, (Sun Dec 13, 3:19 am)
Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buf ..., Michael S. Tsirkin, (Sun Dec 13, 3:26 am)
Re: [PATCH v2 4/4] Defer skb allocation -- change allocati ..., Michael S. Tsirkin, (Sun Dec 13, 4:08 am)
Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set cal ..., Michael S. Tsirkin, (Sun Dec 13, 4:24 am)
Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf allo ..., Michael S. Tsirkin, (Sun Dec 13, 4:43 am)
Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buf ..., Michael S. Tsirkin, (Mon Dec 14, 1:22 pm)
Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buf ..., Michael S. Tsirkin, (Tue Dec 15, 3:57 am)
Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set cal ..., Michael S. Tsirkin, (Tue Dec 15, 4:21 am)
Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf allo ..., Michael S. Tsirkin, (Tue Dec 15, 4:33 am)
Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf allo ..., Michael S. Tsirkin, (Tue Dec 15, 9:39 am)
Re: [RFC PATCH] Subject: virtio: Add unused buffers detach ..., Michael S. Tsirkin, (Tue Dec 15, 11:47 am)
Re: [RFC PATCH] Subject: virtio: Add unused buffers detach ..., Michael S. Tsirkin, (Tue Dec 15, 2:14 pm)
Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buf ..., Michael S. Tsirkin, (Tue Dec 15, 3:40 pm)