KVM Archive on lore.kernel.org
 help / color / Atom feed
* vfio_pin_map_dma cause synchronize_sched wait too long
@ 2019-12-02  9:10 Longpeng (Mike)
  2019-12-02  9:31 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Longpeng (Mike) @ 2019-12-02  9:10 UTC (permalink / raw)
  To: Alex Williamson, pbonzini
  Cc: qemu-devel, kvm, linux-kernel, Longpeng(Mike), Gonglei, Huangzhichao

Hi guys,

Suppose there're two VMs: VM1 is bind to node-0 and calling vfio_pin_map_dma(),
VM2 is a migrate incoming VM which bind to node-1. We found the vm_start( QEMU
function) of VM2 will take too long occasionally, the reason is as follow.

- VM2 -
qemu: vm_start
                    eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC) <-- too long
kern: sys_eventfd2
                synchronize_sched <-- too long

- VM1 -
The VM1 is doing vfio_pin_map_dma at the same time.

The CPU must finish vfio_pin_map_dma and then rcu-sched grace period can be
elapsed, so synchronize_sched would wait for a long time.

Is there any solution to this ? Any suggestion would be greatly appreciated, thanks!


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02  9:10 vfio_pin_map_dma cause synchronize_sched wait too long Longpeng (Mike)
2019-12-02  9:31 ` Paolo Bonzini
2019-12-02  9:42   ` Longpeng (Mike)
2019-12-02 10:06     ` Paolo Bonzini
2019-12-02 10:47       ` Longpeng (Mike)

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git