qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Maxim Levitsky" <mlevitsk@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] kvm/kvm-all.c: listener should delay kvm_vm_ioctl to the commit phase
Date: Fri, 9 Sep 2022 10:04:46 +0200	[thread overview]
Message-ID: <2efe546d-2bc9-68b7-3016-a4674b42729c@redhat.com> (raw)
In-Reply-To: <e0a5f20c-32a5-b57d-0b32-3b1256243b02@redhat.com>



Am 26/08/2022 um 16:44 schrieb David Hildenbrand:
> On 26.08.22 16:32, Emanuele Giuseppe Esposito wrote:
>>
>>
>> Am 26/08/2022 um 16:15 schrieb David Hildenbrand:
>>> On 16.08.22 12:12, Emanuele Giuseppe Esposito wrote:
>>>> Instead of sending a single ioctl every time ->region_* or ->log_*
>>>> callbacks are called, "queue" all memory regions in a list that will
>>>> be emptied only when committing.
>>>>
>>>
>>> Out of interest, how many such regions does the ioctl support? As many
>>> as KVM theoretically supports? (32k IIRC)
>>>
>>
>> I assume you mean for the new ioctl, but yes that's a good question.
>>
>> The problem here is that we could have more than a single update per
>> memory region. So we are not limited anymore to the number of regions,
>> but the number of operations * number of region.
>>
>> I was thinking, maybe when pre-processing QEMU could divide a single
>> transaction into multiple atomic operations (ie operations on the same
>> memory region)? That way avoid sending a single ioctl with 32k *
>> #operation elements. Is that what you mean?
> 
> Oh, so we're effectively collecting slot updates and not the complete
> "slot" view, got it. Was the kernel series already sent so I can have a
> look?

I am going to send it today. I got something working, but it's a little
bit messy on the invalid slots part.

> 
> Note that there are some possible slot updates (like a split, or a
> merge) that involve multiple slots and that would have to be part of the
> same "transaction" to be atomic.
> 
> 

Limiting the size of operations in the IOCTL can be something for the
future. Currently it's already pretty complicated as it is (in the KVM
side), plus I don't see ioctls with more than 8 requests.

Thank you,
Emanuele



      reply	other threads:[~2022-09-09  8:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 10:12 [RFC PATCH 0/2] accel/kvm: extend kvm memory listener to support Emanuele Giuseppe Esposito
2022-08-16 10:12 ` [RFC PATCH 1/2] softmmu/memory: add missing begin/commit callback calls Emanuele Giuseppe Esposito
2022-08-18 19:34   ` Peter Xu
2022-08-26 13:53     ` Emanuele Giuseppe Esposito
2022-08-26 14:13       ` Peter Xu
2022-08-27 21:03         ` Peter Xu
2022-09-09  8:02           ` Emanuele Giuseppe Esposito
2022-08-16 10:12 ` [RFC PATCH 2/2] kvm/kvm-all.c: listener should delay kvm_vm_ioctl to the commit phase Emanuele Giuseppe Esposito
2022-08-18 20:04   ` Peter Xu
2022-08-19  0:55     ` Leonardo Bras Soares Passos
2022-08-22 14:10       ` Peter Xu
2022-08-26 14:07         ` Emanuele Giuseppe Esposito
2022-08-27 20:58           ` Peter Xu
2022-08-30 10:59             ` David Hildenbrand
2022-09-09  8:02               ` Emanuele Giuseppe Esposito
2022-09-09 11:02                 ` David Hildenbrand
2022-09-09  8:00             ` Emanuele Giuseppe Esposito
2022-08-22  9:08   ` Cornelia Huck
2022-08-26 13:53     ` Emanuele Giuseppe Esposito
2022-08-26 14:15   ` David Hildenbrand
2022-08-26 14:32     ` Emanuele Giuseppe Esposito
2022-08-26 14:44       ` David Hildenbrand
2022-09-09  8:04         ` Emanuele Giuseppe Esposito [this message]

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=2efe546d-2bc9-68b7-3016-a4674b42729c@redhat.com \
    --to=eesposit@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kvm@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@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;
as well as URLs for NNTP newsgroup(s).