Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-28 Thread Wanlong Gao
On 01/28/2013 12:24 PM, Jason Wang wrote:
 On 01/28/2013 11:27 AM, Wanlong Gao wrote:
 On 01/25/2013 06:35 PM, Jason Wang wrote:
 Hello all:

 This seires is an update of last version of multiqueue virtio-net support.

 This series tries to brings multiqueue support to virtio-net through a
 multiqueue support tap backend and multiple vhost threads.

 To support this, multiqueue nic support were added to qemu. This is done by
 introducing an array of NetClientStates in NICState, and make each pair of 
 peers
 to be an queue of the nic. This is done in patch 1-7.

 Tap were also converted to be able to create a multiple queue
 backend. Currently, only linux support this by issuing TUNSETIFF N times 
 with
 the same device name to create N queues. Each fd returned by TUNSETIFF were 
 a
 queue supported by kernel. Three new command lines were introduced, queues
 were used to tell how many queues will be created by qemu; fds were used 
 to
 pass multiple pre-created tap file descriptors to qemu; vhostfds were 
 used to
 pass multiple pre-created vhost descriptors to qemu. This is done in patch 
 8-13.

 A method of deleting a queue and queue_index were also introduce for virtio,
 this is done in patch 14-15.

 Vhost were also changed to support multiqueue by introducing a start vq 
 index
 which tracks the first virtqueue that will be used by vhost instead of the
 assumption that the vhost always use virtqueue from index 0. This is done in
 patch 16.

 The last part is the multiqueue userspace changes, this is done in patch 
 17-20.

 With this changes, user could start a multiqueue virtio-net device through

 ./qemu -netdev tap,id=hn0,queues=2,vhost=on -device 
 virtio-net-pci,netdev=hn0

 Management tools such as libvirt can pass multiple pre-created fds/vhostfds 
 through

 ./qemu -netdev tap,id=hn0,fds=X:Y,vhostfds=M:N -device 
 virtio-net-pci,netdev=hn0

 No git tree this round since github is unavailable in China...
 I saw that github had already been opened again. I can use it.
 
 Thanks for reminding, I've pushed the new bits to
 git://github.com/jasowang/qemu.git.

I got host kernel oops here using your qemu tree and 3.8-rc5 kernel on host,

[31499.754779] BUG: unable to handle kernel NULL pointer dereference at 
  (null)
[31499.757098] IP: [816475ef] _raw_spin_lock_irqsave+0x1f/0x40
[31499.758304] PGD 0 
[31499.759498] Oops: 0002 [#1] SMP 
[31499.760704] Modules linked in: tcp_lp fuse xt_CHECKSUM lockd ipt_MASQUERADE 
sunrpc bnep bluetooth rfkill bridge stp llc iptable_nat nf_nat_ipv4 nf_nat 
iptable_mangle nf_conntr
ack_ipv4 nf_defrag_ipv4 nf_conntrack snd_hda_codec_realtek snd_hda_intel 
snd_hda_codec vhost_net tun snd_hwdep macvtap snd_seq macvlan coretemp 
kvm_intel snd_seq_device kvm snd_p
cm crc32c_intel r8169 snd_page_alloc snd_timer ghash_clmulni_intel snd mei 
iTCO_wdt mii microcode iTCO_vendor_support uinput serio_raw wmi i2c_i801 
lpc_ich soundcore pcspkr mfd_c
ore i915 video i2c_algo_bit drm_kms_helper drm i2c_core [last unloaded: 
ip6t_REJECT]
[31499.766412] CPU 2 
[31499.766426] Pid: 18742, comm: vhost-18728 Not tainted 3.8.0-rc5 #1 LENOVO 
QiTianM4300/To be filled by O.E.M.
[31499.769340] RIP: 0010:[816475ef]  [816475ef] 
_raw_spin_lock_irqsave+0x1f/0x40
[31499.770861] RSP: 0018:8801b2f9dd08  EFLAGS: 00010086
[31499.772380] RAX: 0286 RBX:  RCX: 
[31499.773916] RDX: 0100 RSI: 0286 RDI: 
[31499.775394] RBP: 8801b2f9dd08 R08: 880132ed4368 R09: 
[31499.776923] R10: 0001 R11: 0001 R12: 880132ed8590
[31499.778466] R13: 880232a6c290 R14: 880132ed42b0 R15: 880132ed0078
[31499.780012] FS:  () GS:88023fb0() 
knlGS:
[31499.781574] CS:  0010 DS:  ES:  CR0: 80050033
[31499.783126] CR2:  CR3: 000132d9c000 CR4: 000427e0
[31499.784696] DR0:  DR1:  DR2: 
[31499.786267] DR3:  DR6: 0ff0 DR7: 0400
[31499.787822] Process vhost-18728 (pid: 18742, threadinfo 8801b2f9c000, 
task 880036959740)
[31499.788821] Stack:
[31499.790392]  8801b2f9dd38 81082534  
0001
[31499.792029]  880132ed 880232a6c290 8801b2f9dd48 
a023fab6
[31499.793677]  8801b2f9de28 a0242f64 8801b2f9ddb8 
8109e0e0
[31499.795332] Call Trace:
[31499.796974]  [81082534] remove_wait_queue+0x24/0x50
[31499.798641]  [a023fab6] vhost_poll_stop+0x16/0x20 [vhost_net]
[31499.800313]  [a0242f64] handle_tx+0x4c4/0x680 [vhost_net]
[31499.801995]  [8109e0e0] ? idle_balance+0x1b0/0x2f0
[31499.803685]  [a0243155] handle_tx_kick+0x15/0x20 [vhost_net]
[31499.805128]  [a023f95d] vhost_worker+0xed/0x190 [vhost_net]
[31499.806842]  [a023f870] ? 

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-28 Thread Jason Wang
On 01/29/2013 01:36 PM, Wanlong Gao wrote:
 On 01/28/2013 12:24 PM, Jason Wang wrote:
 On 01/28/2013 11:27 AM, Wanlong Gao wrote:
 On 01/25/2013 06:35 PM, Jason Wang wrote:
 Hello all:

 This seires is an update of last version of multiqueue virtio-net support.

 This series tries to brings multiqueue support to virtio-net through a
 multiqueue support tap backend and multiple vhost threads.

 To support this, multiqueue nic support were added to qemu. This is done by
 introducing an array of NetClientStates in NICState, and make each pair of 
 peers
 to be an queue of the nic. This is done in patch 1-7.

 Tap were also converted to be able to create a multiple queue
 backend. Currently, only linux support this by issuing TUNSETIFF N times 
 with
 the same device name to create N queues. Each fd returned by TUNSETIFF 
 were a
 queue supported by kernel. Three new command lines were introduced, 
 queues
 were used to tell how many queues will be created by qemu; fds were used 
 to
 pass multiple pre-created tap file descriptors to qemu; vhostfds were 
 used to
 pass multiple pre-created vhost descriptors to qemu. This is done in patch 
 8-13.

 A method of deleting a queue and queue_index were also introduce for 
 virtio,
 this is done in patch 14-15.

 Vhost were also changed to support multiqueue by introducing a start vq 
 index
 which tracks the first virtqueue that will be used by vhost instead of the
 assumption that the vhost always use virtqueue from index 0. This is done 
 in
 patch 16.

 The last part is the multiqueue userspace changes, this is done in patch 
 17-20.

 With this changes, user could start a multiqueue virtio-net device through

 ./qemu -netdev tap,id=hn0,queues=2,vhost=on -device 
 virtio-net-pci,netdev=hn0

 Management tools such as libvirt can pass multiple pre-created 
 fds/vhostfds through

 ./qemu -netdev tap,id=hn0,fds=X:Y,vhostfds=M:N -device 
 virtio-net-pci,netdev=hn0

 No git tree this round since github is unavailable in China...
 I saw that github had already been opened again. I can use it.
 Thanks for reminding, I've pushed the new bits to
 git://github.com/jasowang/qemu.git.
 I got host kernel oops here using your qemu tree and 3.8-rc5 kernel on host,

 [31499.754779] BUG: unable to handle kernel NULL pointer dereference at   
 (null)
 [31499.757098] IP: [816475ef] _raw_spin_lock_irqsave+0x1f/0x40
 [31499.758304] PGD 0 
 [31499.759498] Oops: 0002 [#1] SMP 
 [31499.760704] Modules linked in: tcp_lp fuse xt_CHECKSUM lockd 
 ipt_MASQUERADE sunrpc bnep bluetooth rfkill bridge stp llc iptable_nat 
 nf_nat_ipv4 nf_nat iptable_mangle nf_conntr
 ack_ipv4 nf_defrag_ipv4 nf_conntrack snd_hda_codec_realtek snd_hda_intel 
 snd_hda_codec vhost_net tun snd_hwdep macvtap snd_seq macvlan coretemp 
 kvm_intel snd_seq_device kvm snd_p
 cm crc32c_intel r8169 snd_page_alloc snd_timer ghash_clmulni_intel snd mei 
 iTCO_wdt mii microcode iTCO_vendor_support uinput serio_raw wmi i2c_i801 
 lpc_ich soundcore pcspkr mfd_c
 ore i915 video i2c_algo_bit drm_kms_helper drm i2c_core [last unloaded: 
 ip6t_REJECT]
 [31499.766412] CPU 2 
 [31499.766426] Pid: 18742, comm: vhost-18728 Not tainted 3.8.0-rc5 #1 LENOVO 
 QiTianM4300/To be filled by O.E.M.
 [31499.769340] RIP: 0010:[816475ef]  [816475ef] 
 _raw_spin_lock_irqsave+0x1f/0x40
 [31499.770861] RSP: 0018:8801b2f9dd08  EFLAGS: 00010086
 [31499.772380] RAX: 0286 RBX:  RCX: 
 
 [31499.773916] RDX: 0100 RSI: 0286 RDI: 
 
 [31499.775394] RBP: 8801b2f9dd08 R08: 880132ed4368 R09: 
 
 [31499.776923] R10: 0001 R11: 0001 R12: 
 880132ed8590
 [31499.778466] R13: 880232a6c290 R14: 880132ed42b0 R15: 
 880132ed0078
 [31499.780012] FS:  () GS:88023fb0() 
 knlGS:
 [31499.781574] CS:  0010 DS:  ES:  CR0: 80050033
 [31499.783126] CR2:  CR3: 000132d9c000 CR4: 
 000427e0
 [31499.784696] DR0:  DR1:  DR2: 
 
 [31499.786267] DR3:  DR6: 0ff0 DR7: 
 0400
 [31499.787822] Process vhost-18728 (pid: 18742, threadinfo 8801b2f9c000, 
 task 880036959740)
 [31499.788821] Stack:
 [31499.790392]  8801b2f9dd38 81082534  
 0001
 [31499.792029]  880132ed 880232a6c290 8801b2f9dd48 
 a023fab6
 [31499.793677]  8801b2f9de28 a0242f64 8801b2f9ddb8 
 8109e0e0
 [31499.795332] Call Trace:
 [31499.796974]  [81082534] remove_wait_queue+0x24/0x50
 [31499.798641]  [a023fab6] vhost_poll_stop+0x16/0x20 [vhost_net]
 [31499.800313]  [a0242f64] handle_tx+0x4c4/0x680 [vhost_net]
 [31499.801995]  [8109e0e0] ? idle_balance+0x1b0/0x2f0
 [31499.803685]  [a0243155] handle_tx_kick+0x15/0x20 [vhost_net]
 

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-27 Thread Jason Wang
On 01/28/2013 11:27 AM, Wanlong Gao wrote:
 On 01/25/2013 06:35 PM, Jason Wang wrote:
 Hello all:

 This seires is an update of last version of multiqueue virtio-net support.

 This series tries to brings multiqueue support to virtio-net through a
 multiqueue support tap backend and multiple vhost threads.

 To support this, multiqueue nic support were added to qemu. This is done by
 introducing an array of NetClientStates in NICState, and make each pair of 
 peers
 to be an queue of the nic. This is done in patch 1-7.

 Tap were also converted to be able to create a multiple queue
 backend. Currently, only linux support this by issuing TUNSETIFF N times with
 the same device name to create N queues. Each fd returned by TUNSETIFF were a
 queue supported by kernel. Three new command lines were introduced, queues
 were used to tell how many queues will be created by qemu; fds were used to
 pass multiple pre-created tap file descriptors to qemu; vhostfds were used 
 to
 pass multiple pre-created vhost descriptors to qemu. This is done in patch 
 8-13.

 A method of deleting a queue and queue_index were also introduce for virtio,
 this is done in patch 14-15.

 Vhost were also changed to support multiqueue by introducing a start vq index
 which tracks the first virtqueue that will be used by vhost instead of the
 assumption that the vhost always use virtqueue from index 0. This is done in
 patch 16.

 The last part is the multiqueue userspace changes, this is done in patch 
 17-20.

 With this changes, user could start a multiqueue virtio-net device through

 ./qemu -netdev tap,id=hn0,queues=2,vhost=on -device virtio-net-pci,netdev=hn0

 Management tools such as libvirt can pass multiple pre-created fds/vhostfds 
 through

 ./qemu -netdev tap,id=hn0,fds=X:Y,vhostfds=M:N -device 
 virtio-net-pci,netdev=hn0

 No git tree this round since github is unavailable in China...
 I saw that github had already been opened again. I can use it.

Thanks for reminding, I've pushed the new bits to
git://github.com/jasowang/qemu.git.

 Thanks,
 Wanlong Gao



--
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