KVM Archive on lore.kernel.org
 help / color / Atom feed
From: "Longpeng (Mike)" <longpeng2@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>
Cc: <qemu-devel@nongnu.org>, <kvm@vger.kernel.org>,
	"Longpeng(Mike)" <longpeng.mike@gmail.com>,
	Gonglei <arei.gonglei@huawei.com>,
	Huangzhichao <huangzhichao@huawei.com>
Subject: Re: vfio_pin_map_dma cause synchronize_sched wait too long
Date: Mon, 2 Dec 2019 17:42:13 +0800
Message-ID: <561fb205-16be-ae87-9cfe-61e6a3b04dc5@huawei.com> (raw)
In-Reply-To: <34c53520-4144-fe71-528a-8df53e7f4dd1@redhat.com>

在 2019/12/2 17:31, Paolo Bonzini 写道:
> On 02/12/19 10:10, Longpeng (Mike) wrote:
>> 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.
> Which part of vfio_pin_map_dma is running?  There is already a

I need more analysis to find which part.

> cond_resched in vfio_iommu_map.  Perhaps you could add one to
> vfio_pin_pages_remote and/or use vfio_pgsize_bitmap to cap the number of
> pages that it returns.

Um ... There's only one running task (qemu-kvm of the VM1) on that CPU, so maybe
the cond_resched() is ineffective ?

> > Paolo


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  9:10 Longpeng (Mike)
2019-12-02  9:31 ` Paolo Bonzini
2019-12-02  9:42   ` Longpeng (Mike) [this message]
2019-12-02 10:06     ` Paolo Bonzini
2019-12-02 10:47       ` Longpeng (Mike)

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561fb205-16be-ae87-9cfe-61e6a3b04dc5@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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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