From: Shirley Ma <mashirle@us.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] defer skb allocation in virtio_net -- mergable buff part
Date: Fri, 18 Sep 2009 10:04:05 -0700 [thread overview]
Message-ID: <1253293445.4611.9.camel@localhost.localdomain> (raw)
In-Reply-To: <20090825114143.GA13884@redhat.com>
Hello Michael,
I am working on the patch to address the question you raised below. I am
adding one more function -- destroy_buf in virtqueue_ops, so we don't
need to maintain the list of pending buffers in upper layer (like
virtio_net), when the device is shutdown or removed, this buffer free
func will be called to release all pending buffers in virtio_ring on
behalf of virtio_net.
The rest of comments are minor. The new patch will defer skb allocation
for both mergable and none-mergable buffers.
Thanks
Shirley
On Tue, 2009-08-25 at 14:41 +0300, Michael S. Tsirkin wrote:
> > #define VIRTNET_SEND_COMMAND_SG_MAX 2
> >
> > +struct page_list
> > +{
>
> Kernel style is "struct page_list {".
> Also, prefix with virtnet_?
>
> > + struct page *page;
> > + struct list_head list;
> > +};
> > +
> > struct virtnet_info
> > {
> > struct virtio_device *vdev;
> > @@ -72,6 +79,8 @@ struct virtnet_info
> >
> > /* Chain pages by the private ptr. */
> > struct page *pages;
>
> Do we need the pages list now? Can we do without?
>
> Pls document fields below.
>
> > + struct list_head used_pages;
>
> Seems a waste to have this list just for dev down.
> Extend virtio to give us all buffers from vq
> on shutdown?
>
prev parent reply other threads:[~2009-09-18 17:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 6:33 [RFC] defer skb allocation in virtio_net -- mergable buff part Shirley Ma
2009-08-16 13:47 ` Avi Kivity
2009-08-24 17:51 ` Shirley Ma
2009-08-25 11:41 ` Michael S. Tsirkin
2009-09-08 18:30 ` Shirley Ma
2009-09-18 17:04 ` Shirley Ma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253293445.4611.9.camel@localhost.localdomain \
--to=mashirle@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).