From: David Hildenbrand <david@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Wei Wang <wei.w.wang@intel.com>
Cc: peterx@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com,
quintela@redhat.com
Subject: Re: [PATCH v1] migration: clear the memory region dirty bitmap when skipping free pages
Date: Wed, 14 Jul 2021 12:30:09 +0200 [thread overview]
Message-ID: <25a2203f-fe82-41a6-ab40-2e4b5522fa14@redhat.com> (raw)
In-Reply-To: <20210714062715-mutt-send-email-mst@kernel.org>
On 14.07.21 12:27, Michael S. Tsirkin wrote:
> On Wed, Jul 14, 2021 at 03:51:04AM -0400, Wei Wang wrote:
>> When skipping free pages, their corresponding dirty bits in the memory
>> region dirty bitmap need to be cleared. Otherwise the skipped pages will
>> be sent in the next round after the migration thread syncs dirty bits
>> from the memory region dirty bitmap.
>>
>> migration_clear_memory_region_dirty_bitmap_range is put outside the
>> bitmap_mutex, becasue
>
> because?
>
>> memory_region_clear_dirty_bitmap is possible to block
>> on the kvm slot mutex (don't want holding bitmap_mutex while blocked on
>> another mutex), and clear_bmap_test_and_clear uses atomic operation.
How is that different from our existing caller?
Please either clean everything up, completely avoiding the lock
(separate patch), or move it under the lock.
Or am I missing something important?
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-07-14 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 7:51 [PATCH v1] migration: clear the memory region dirty bitmap when skipping free pages Wei Wang
2021-07-14 10:27 ` Michael S. Tsirkin
2021-07-14 10:30 ` David Hildenbrand [this message]
2021-07-14 14:58 ` Wang, Wei W
2021-07-14 15:24 ` Peter Xu
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=25a2203f-fe82-41a6-ab40-2e4b5522fa14@redhat.com \
--to=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=wei.w.wang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).