Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-14 Thread Shirley Ma
On Sun, 2009-12-13 at 13:24 +0200, Michael S. Tsirkin wrote: Hmm, this scans the whole list each time. OTOH, the caller probably can easily get list tail as well as head. If we ask caller to give us list tail, and chain them at head, then 1. we won't have to scan the list each time 2. we get

Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-14 Thread Shirley Ma
Thanks Rusty, agree with you, working on them. Shirley -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-13 Thread Michael S. Tsirkin
On Fri, Dec 11, 2009 at 04:43:02AM -0800, Shirley Ma wrote: Signed-off-by: Shirley Ma x...@us.ibm.com -- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index bb5eb7b..100b4b9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -80,29 +80,25

Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-13 Thread Rusty Russell
On Fri, 11 Dec 2009 11:13:02 pm Shirley Ma wrote: Signed-off-by: Shirley Ma x...@us.ibm.com I don't think there's a good way of splitting this change across multiple patches. And I don't think this patch will compile; I don't think we can get rid of trim_pages yet. We *could* first split the

[PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-11 Thread Shirley Ma
Signed-off-by: Shirley Ma x...@us.ibm.com -- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index bb5eb7b..100b4b9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -80,29 +80,25 @@ static inline struct skb_vnet_hdr *skb_vnet_hdr(struct sk_buff