From: "Longpeng (Mike)" <longpeng2@huawei.com>
To: Alex Williamson <alex.williamson@redhat.com>, <pbonzini@redhat.com>
Cc: <qemu-devel@nongnu.org>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Longpeng(Mike)" <longpeng.mike@gmail.com>,
Gonglei <arei.gonglei@huawei.com>,
Huangzhichao <huangzhichao@huawei.com>
Subject: vfio_pin_map_dma cause synchronize_sched wait too long
Date: Mon, 2 Dec 2019 17:10:26 +0800 [thread overview]
Message-ID: <2e53a9f0-3225-d416-98ff-55bd337330bc@huawei.com> (raw)
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
vm_start_notify
virtio_vmstate_change
virtio_pci_vmstate_change
virtio_pci_start_ioeventfd
virtio_device_start_ioeventfd_impl
event_notifier_init
eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC) <-- too long
kern: sys_eventfd2
get_unused_fd_flags
__alloc_fd
expand_files
expand_fdtable
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!
--
Regards,
Longpeng(Mike)
next reply other threads:[~2019-12-02 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 9:10 Longpeng (Mike) [this message]
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)
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=2e53a9f0-3225-d416-98ff-55bd337330bc@huawei.com \
--to=longpeng2@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=huangzhichao@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longpeng.mike@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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
all inboxes | Powered by JetHome®