login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
May
»
9
Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Michael S. Tsirkin
Subject:
Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.
Date: Sunday, May 9, 2010 - 2:26 am
On Sat, May 08, 2010 at 03:55:48PM +0800, Xin, Xiaohui wrote:
quoted text
> Michael, > Sorry, somehow I missed this mail. :-( > > >> Here, we have ever considered 2 ways to utilize the page constructor > >> API to dispense the user buffers. > >> > >> One: Modify __alloc_skb() function a bit, it can only allocate a > >> structure of sk_buff, and the data pointer is pointing to a > >> user buffer which is coming from a page constructor API. > >> Then the shinfo of the skb is also from guest. > >> When packet is received from hardware, the skb->data is filled > >> directly by h/w. What we have done is in this way. > >> > >> Pros: We can avoid any copy here. > >> Cons: Guest virtio-net driver needs to allocate skb as almost > >> the same method with the host NIC drivers, say the size > >> of netdev_alloc_skb() and the same reserved space in the > >> head of skb. Many NIC drivers are the same with guest and > >> ok for this. But some lastest NIC drivers reserves special > >> room in skb head. To deal with it, we suggest to provide > >> a method in guest virtio-net driver to ask for parameter > >> we interest from the NIC driver when we know which device > >> we have bind to do zero-copy. Then we ask guest to do so. > >> Is that reasonable? > > >Do you still do this? > > Currently, we still use the first way. But we now ignore the room which > host skb_reserve() required when device is doing zero-copy. Now we don't > taint guest virtio-net driver with a new method by this way. > > >> Two: Modify driver to get user buffer allocated from a page constructor > >> API(to substitute alloc_page()), the user buffer are used as payload > >> buffers and filled by h/w directly when packet is received. Driver > >> should associate the pages with skb (skb_shinfo(skb)->frags). For > >> the head buffer side, let host allocates skb, and h/w fills it. > >> After that, the data filled in host skb header will be copied into > >> guest header buffer which is submitted together with the payload buffer. > >> > >> Pros: We could less care the way how guest or host allocates their > >> buffers. > >> Cons: We still need a bit copy here for the skb header. > >> > >> We are not sure which way is the better here. This is the first thing we want > >> to get comments from the community. We wish the modification to the network > >> part will be generic which not used by vhost-net backend only, but a user > >> application may use it as well when the zero-copy device may provides async > >> read/write operations later. > > >I commented on this in the past. Do you still want comments? > > Now we continue with the first way and try to push it. But any comments about the two methods are still welcome. > > >That's nice. The thing to do is probably to enable GSO/TSO > >and see what we get this way. Also, mergeable buffer support > >was recently posted and I hope to merge it for 2.6.35. > >You might want to take a look. > > I'm looking at the mergeable buffer. I think GSO/GRO support with zero-copy also needs it. > Currently, GSO/TSO is still not supported by vhost-net?
GSO/TSO are currently supported with tap and macvtap, AF_PACKET socket backend still needs some work to enable GSO.
quoted text
> -- > MST
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH v4 01/18] Add a new struct for device to manip ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 02/18] Export 2 func for device to assign/d ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 03/18] Add a ndo_mp_port_prep pointer to ne ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 04/18] Add a function make external buffer ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 05/18] Add a function to indicate if device ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 06/18] Add interface to get external buffers.
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 07/18] Make __alloc_skb() to get external b ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 08/18] Ignore skb_reserve() when device is ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 09/18] Don't do skb recycle, if device use ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 10/18] Use callback to deal with skb_releas ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 11/18] Add a hook to intercept external buf ...
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 12/18] To skip GRO if buffer is external.
, xiaohui.xin
, (Sun Apr 25, 2:19 am)
[RFC][PATCH v4 13/18] Add header file for mp device.
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 14/18] Add basic func and special ioctl to ...
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 15/18] Manipulate external buffers in mp de ...
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 16/18] Export proto_ops to vhost-net driver.
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 17/18] Add a kconfig entry and make entry f ...
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 18/18] Provides multiple submits and async ...
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
[RFC][PATCH v4 00/18] Provide a zero-copy method on KVM vi ...
, xiaohui.xin
, (Sun Apr 25, 2:20 am)
Re: [RFC][PATCH v4 05/18] Add a function to indicate if de ...
, Changli Gao
, (Sun Apr 25, 2:33 am)
Re: [RFC][PATCH v4 05/18] Add a function to indicate if de ...
, Changli Gao
, (Sun Apr 25, 2:35 am)
Re: [RFC][PATCH v4 05/18] Add a function to indicate if de ...
, David Miller
, (Sun Apr 25, 2:51 am)
Re: [RFC][PATCH v4 05/18] Add a function to indicate if de ...
, David Miller
, (Sun Apr 25, 2:51 am)
Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KV ...
, David Miller
, (Sun Apr 25, 2:55 am)
Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KV ...
, Michael S. Tsirkin
, (Sun Apr 25, 5:14 am)
RE: [RFC][PATCH v4 00/18] Provide a zero-copy method on KV ...
, Xin, Xiaohui
, (Wed Apr 28, 6:33 pm)
RE: [RFC][PATCH v4 05/18] Add a function to indicate if de ...
, Xin, Xiaohui
, (Wed Apr 28, 6:38 pm)
RE: [RFC][PATCH v4 00/18] Provide a zero-copy method on KV ...
, Xin, Xiaohui
, (Sat May 8, 12:55 am)
Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KV ...
, Michael S. Tsirkin
, (Sun May 9, 2:26 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Rafael J. Wysocki
[Bug #11287] Regression in 2.6.27-rc2 in acpi_processor_init()
Ingo Molnar
Re: [GIT PULL] time.c - respin
Ingo Molnar
Re: [PATCH] x86: silence section mismatch warning - uv_cpu_init
Rafael J. Wysocki
[Bug #11380] lockdep warning: cpu_add_remove_lock at:cpu_maps_update_begin+0x14/0x16
git
:
Mark Junker
git on MacOSX and files with decomposed utf-8 file names
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
Stephen J. Bevan
GRE over IPsec
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Guido Tschakert
Re: what exactly is enc0?
Darrin Chandler
Re: strange output on openbsd C code
Colocation donated by:
Syndicate