From: David Hildenbrand <david@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Peter Xu <peterx@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH RFC] memory: pause all vCPUs for the duration of memory transactions
Date: Tue, 27 Oct 2020 14:35:04 +0100 [thread overview]
Message-ID: <219ac264-dcd4-70f0-244f-1bee601aded7@redhat.com> (raw)
In-Reply-To: <875z6v24e2.fsf@vitty.brq.redhat.com>
>> Same applies to all other kinds of operations (splitting, punching out,
>> ...) as you also mentioned.
>
> One question from a QEMU newbie though: why do you put
> kvm_ioctl_inhibit_begin()/kvm_ioctl_inhibit_end() to kvm_region_resize()
> only and not taking it all the way up to
> memory_region_transaction_begin()/memory_region_transaction_end() to
> support atomicity for all kinds of updates right away?
The clean way to implement it for
memory_region_transaction_begin()/memory_region_transaction_end() is by
implementing
->begin()
->commit()
callbacks for the KVM MemoryListener, and doing it in there, in KVM code.
Now, I wasn't sure how this might affect real-time workloads, where you
really don't want to kick CPUs out of KVM. You can make a lot of
operations without requiring this handling like
1. Adding regions (memory hotplug)
2. Removing regions (memory hotunplug)
3. Enabling/disabling dirty logging
Resize/split(/move/...) are the problematic operations where we would
need that handling. Modifying the size/location of existing slots.
One way to tackle it would be to "sense" upfront if such "modifying"
operations will be required, communicating that via "->begin()", and
letting the KVM notifier decide based on that information whether to get
everything out of KVM. Sounds feasible.
>
> The second question is whether you plan to sumbit this any time soon)
Once we have an agreement on how to proceed, either I can try to
dedicate some time, or if you have some time, you can pickup my work and
make it also handle the other problematic cases (as discussed e.g., ^).
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-10-27 13:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 8:49 [PATCH RFC] memory: pause all vCPUs for the duration of memory transactions Vitaly Kuznetsov
2020-10-26 10:43 ` David Hildenbrand
2020-10-26 11:17 ` David Hildenbrand
2020-10-27 12:36 ` Vitaly Kuznetsov
2020-10-27 12:42 ` David Hildenbrand
2020-10-27 13:02 ` Vitaly Kuznetsov
2020-10-27 13:08 ` David Hildenbrand
2020-10-27 13:19 ` Vitaly Kuznetsov
2020-10-27 13:35 ` David Hildenbrand [this message]
2020-10-27 13:47 ` Vitaly Kuznetsov
2020-10-27 14:20 ` Igor Mammedov
2020-11-02 19:57 ` Peter Xu
2020-11-03 13:07 ` Vitaly Kuznetsov
2020-11-03 16:37 ` Peter Xu
2020-11-04 18:09 ` Laszlo Ersek
2020-11-04 19:23 ` Peter Xu
2020-11-05 15:36 ` Vitaly Kuznetsov
2020-11-05 16:35 ` Peter Xu
2020-11-04 17:58 ` Laszlo Ersek
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=219ac264-dcd4-70f0-244f-1bee601aded7@redhat.com \
--to=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vkuznets@redhat.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).