From: Igor Mammedov <imammedo@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: thuth@redhat.com, david@redhat.com,
Cornelia Huck <cohuck@redhat.com>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.2 v5 1/2] kvm: s390: split too big memory section on several memslots
Date: Mon, 2 Sep 2019 15:49:29 +0200 [thread overview]
Message-ID: <20190902154929.16f32591@redhat.com> (raw)
In-Reply-To: <4f816851-9435-51e0-81e9-0dc2ac47ff78@de.ibm.com>
On Fri, 30 Aug 2019 18:19:29 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 30.08.19 11:41, Igor Mammedov wrote:
> > On Thu, 29 Aug 2019 14:41:13 +0200
> > Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >
> >> On 29.08.19 14:31, Igor Mammedov wrote:
> >>> On Thu, 29 Aug 2019 14:07:44 +0200
> >>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>>
> >>>> On 29.08.19 14:04, Igor Mammedov wrote:
> >>>>> On Thu, 29 Aug 2019 08:47:49 +0200
> >>>>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> >>>>>
> >>>>>> On 27.08.19 14:56, Igor Mammedov wrote:
> >>>>>>> On Tue, 20 Aug 2019 18:07:27 +0200
> >>>>>>> Cornelia Huck <cohuck@redhat.com> wrote:
> >>>>>>>
> >>>>>>>> On Wed, 7 Aug 2019 11:32:41 -0400
> >>>>>>>> Igor Mammedov <imammedo@redhat.com> wrote:
> >>>>>>>>
> >>>>>>>>> Max memslot size supported by kvm on s390 is 8Tb,
> >>>>>>>>> move logic of splitting RAM in chunks upto 8T to KVM code.
> >>>>>>>>>
> >>>>>>>>> This way it will hide KVM specific restrictions in KVM code
> >>>>>>>>> and won't affect baord level design decisions. Which would allow
> >>>>>>>>> us to avoid misusing memory_region_allocate_system_memory() API
> >>>>>>>>> and eventually use a single hostmem backend for guest RAM.
> >>>>>>>>>
> >>>>>>>>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> >>>>>>>>> ---
> >>>>>>>>> v5:
> >>>>>>>>> * move computation 'size -= slot_size' inside of loop body
> >>>>>>>>> (David Hildenbrand <david@redhat.com>)
> >>>>>>>>> v4:
> >>>>>>>>> * fix compilation issue
> >>>>>>>>> (Christian Borntraeger <borntraeger@de.ibm.com>)
> >>>>>>>>> * advance HVA along with GPA in kvm_set_phys_mem()
> >>>>>>>>> (Christian Borntraeger <borntraeger@de.ibm.com>)
> >>>>>>>>>
> >>>>>>>>> patch prepares only KVM side for switching to single RAM memory region
> >>>>>>>>> another patch will take care of dropping manual RAM partitioning in
> >>>>>>>>> s390 code.
> >>>>>>>>
> >>>>>>>> I may have lost track a bit -- what is the status of this patch (and
> >>>>>>>> the series)?
> >>>>>>>
> >>>>>>> Christian,
> >>>>>>>
> >>>>>>> could you test it on a host that have sufficient amount of RAM?
> >>>>>>
> >>>>>>
> >>>>>> This version looks good. I was able to start a 9TB guest.
> >>>>>> [pid 215723] ioctl(10, KVM_SET_USER_MEMORY_REGION, {slot=0, flags=0, guest_phys_addr=0, memory_size=8796091973632, userspace_addr=0x3ffee700000}) = 0
> >>>>>> [pid 215723] ioctl(10, KVM_SET_USER_MEMORY_REGION, {slot=1, flags=0, guest_phys_addr=0x7fffff00000, memory_size=1099512676352, userspace_addr=0xbffee600000}) = 0
> >>>>
> >>>>>> The only question is if we want to fix the weird alignment (0x7fffff00000) when
> >>>>>> we already add a migration barrier for uber-large guests.
> >>>>>> Maybe we could split at 4TB to avoid future problem with larger page sizes?
> >>>>> That probably should be a separate patch on top.
> >>>>
> >>>> Right. The split in KVM code is transparent to migration and other parts of QEMU, correct?
> >>>
> >>> it should not affect other QEMU parts and migration (to my limited understanding of it),
> >>> we are passing to KVM memory slots upto KVM_SLOT_MAX_BYTES as we were doing before by
> >>> creating several memory regions instead of one as described in [2/2] commit message.
> >>>
> >>> Also could you also test migration of +9Tb guest, to check that nothing where broken by
> >>> accident in QEMU migration code?
> >>
> >> I only have one server that is large enough :-/
> > Could you test offline migration on it (to a file and restore from it)?
>
> I tested migration with a hacked QEMU (basically split in KVM code at 1GB instead of 8TB) and
> the restore from file failed with data corruption in the guest. The current code
> does work when I use small memslots. No idea yet what is wrong.
I've tested 2Gb (max, I can test) guest (also hacked up version)
and it worked for me.
How do you test it and detect corruption so I could try to reproduce it locally?
(given it worked before, there is no much hope but I could try)
next prev parent reply other threads:[~2019-09-02 13:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 9:48 [Qemu-devel] [PATCH for-4.2 v4 0/2] s390: stop abusing memory_region_allocate_system_memory() Igor Mammedov
2019-08-06 9:48 ` [Qemu-devel] [PATCH for-4.2 v4 1/2] kvm: s390: split too big memory section on several memslots Igor Mammedov
2019-08-07 7:54 ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2019-08-07 9:55 ` Igor Mammedov
2019-08-07 10:20 ` David Hildenbrand
2019-08-07 15:32 ` [Qemu-devel] [PATCH for-4.2 v5 " Igor Mammedov
2019-08-20 16:07 ` Cornelia Huck
2019-08-27 12:56 ` Igor Mammedov
2019-08-29 6:47 ` Christian Borntraeger
2019-08-29 12:04 ` Igor Mammedov
2019-08-29 12:07 ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2019-08-29 12:31 ` Igor Mammedov
2019-08-29 12:41 ` Christian Borntraeger
2019-08-30 9:41 ` Igor Mammedov
2019-08-30 16:19 ` Christian Borntraeger
2019-09-02 13:49 ` Igor Mammedov [this message]
2019-09-03 6:57 ` Christian Borntraeger
2019-09-16 13:16 ` Igor Mammedov
2019-08-06 9:48 ` [Qemu-devel] [PATCH for-4.2 v4 2/2] s390: do not call memory_region_allocate_system_memory() multiple times Igor Mammedov
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=20190902154929.16f32591@redhat.com \
--to=imammedo@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@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).