All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [SPDK] qemu process hung at boot-up, no explicit errors or warnings
@ 2018-04-19 10:13 Bob Chen
  2018-04-19 17:17 ` John Snow
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Chen @ 2018-04-19 10:13 UTC (permalink / raw)
  To: QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

Hi,

I was trying to run qemu with spdk, referring to
http://www.spdk.io/doc/vhost.html#vhost_qemu_config

Everything went well since I had already set up hugepages, vfio, vhost
targets, vhost-scsi device(vhost-block was also tested), etc, without
errors or warnings reported.

But at the last step to run qemu, the process would somehow hang. And its
cpu busy remained 100%.

I used `perf top -p` to monitor the process activity,
  18.28%  [kernel]                      [k] vmx_vcpu_run
   3.06%  [kernel]                      [k] vcpu_enter_guest
   3.05%  [kernel]                      [k] system_call_after_swapgs

Do you have any ideas about what happened here?

Test environment: latest CentOS 7 kernel, nvme ssd, spdk v18.01.x,
dpdk 17.11.1, qemu 2.12.0-rc2. Detail log is attached within this mail.



Thanks,
Bob

[-- Attachment #2: qemu-spdk.log --]
[-- Type: application/octet-stream, Size: 4526 bytes --]

# ./app/vhost/vhost -S /var/tmp -s 4096 -m 0x3 &
[1] 12647
Starting DPDK 17.11.1 initialization...
[ DPDK EAL parameters: vhost -c 0x3 -m 4096 --file-prefix=spdk_pid12647 ]
EAL: Detected 32 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
app.c: 377:spdk_app_start: *NOTICE*: Total cores available: 2
reactor.c: 654:spdk_reactors_init: *NOTICE*: Occupied cpu socket mask is 0x3
reactor.c: 426:_spdk_reactor_run: *NOTICE*: Reactor started on core 1 on socket 1
reactor.c: 426:_spdk_reactor_run: *NOTICE*: Reactor started on core 0 on socket 0
copy_engine_ioat.c: 306:copy_engine_ioat_init: *NOTICE*: Ioat Copy Engine Offload Enabled


# ./scripts/rpc.py construct_nvme_bdev -b Nvme0 -t pcie -a 0000:03:00.0
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL:   probe driver: 1c5f:540 spdk_nvme
EAL:   using IOMMU type 1 (Type 1)


# ./scripts/rpc.py construct_malloc_bdev 128 4096  -b Malloc0
Malloc0


# ./scripts/rpc.py construct_vhost_scsi_controller --cpumask 0x1 vhost.0
VHOST_CONFIG: vhost-user server: socket created, fd: 26
VHOST_CONFIG: bind to /var/tmp/vhost.0
vhost.c: 728:spdk_vhost_dev_construct: *NOTICE*: Controller vhost.0: new controller added


# ./scripts/rpc.py add_vhost_scsi_lun vhost.0 0 Nvme0n1
vhost_scsi.c: 841:spdk_vhost_scsi_dev_add_tgt: *NOTICE*: Controller vhost.0: defined target 'Target 0' using bdev 'Nvme0n1'


# ./scripts/rpc.py add_vhost_scsi_lun vhost.0 1 Malloc0
vhost_scsi.c: 841:spdk_vhost_scsi_dev_add_tgt: *NOTICE*: Controller vhost.0: defined target 'Target 1' using bdev 'Malloc0'



# qemu-system-x86_64 \
  --enable-kvm \
  -cpu host -smp 2 \
  -m 2G -object memory-backend-file,id=mem0,size=2G,mem-path=/dev/hugepages,share=on -numa node,memdev=mem0 \
  ...
  -chardev socket,id=spdk_vhost_scsi0,path=/var/tmp/vhost.0 \
  -device vhost-user-scsi-pci,id=scsi0,chardev=spdk_vhost_scsi0,num_queues=4 
  ...


# vhost log

VHOST_CONFIG: new vhost user connection is 20
VHOST_CONFIG: new device, handle is 0
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_GET_PROTOCOL_FEATURES
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_PROTOCOL_FEATURES
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_GET_QUEUE_NUM
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_OWNER
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:27
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:1 file:28
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:2 file:29
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:3 file:30
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:4 file:31
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:5 file:32
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_FEATURES
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_MEM_TABLE
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_NUM
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_BASE
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_ADDR
VHOST_CONFIG: guest memory region 0, size: 0x40000000
	 guest physical addr: 0x0
	 guest virtual  addr: 0x7fcfc0000000
	 host  virtual  addr: 0x2aaac0000000
	 mmap addr : 0x2aaac0000000
	 mmap size : 0x40000000
	 mmap align: 0x40000000
	 mmap off  : 0x0
VHOST_CONFIG: reallocate vq from 0 to 1 node
VHOST_CONFIG: reallocate dev from 0 to 1 node
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_KICK
VHOST_CONFIG: vring kick idx:2 file:34
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:35
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:1 file:27
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:2 file:28
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:3 file:29
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:4 file:30
VHOST_CONFIG: /var/tmp/vhost.0: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:5 file:31 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-23  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 10:13 [Qemu-devel] [SPDK] qemu process hung at boot-up, no explicit errors or warnings Bob Chen
2018-04-19 17:17 ` John Snow
2018-04-20 11:13   ` Bob Chen
2018-04-20 17:34     ` John Snow
2018-04-23  9:18       ` Bob Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.