From: David Hildenbrand <david@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>, Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
kvm@vger.kernel.org
Subject: Re: 9 TiB vm memory creation
Date: Mon, 14 Feb 2022 17:32:03 +0100 [thread overview]
Message-ID: <2743ef0f-c73c-5a55-067b-6068c23334f3@redhat.com> (raw)
In-Reply-To: <20220214165515.226a1955@redhat.com>
>>>
>>> With KVM enabled it bails out with:
>>> qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION failed, slot=1, start=0x100000000, size=0x8ff40000000: Invalid argument
>>>
>>> all of that on a host with 32G of RAM/no swap.
>>>
>>>
>>
>> #define KVM_MEM_MAX_NR_PAGES ((1UL << 31) - 1)
>>
>> ~8 TiB (7,999999)
>
> so essentially that's the our max for initial RAM
> (ignoring initial RAM slots before 4Gb)
>
> Are you aware of any attempts to make it larger?
Not really, I think for now only s390x had applicable machines where
you'd have that much memory on a single NUMA node.
>
> But can we use extra pc-dimm devices for additional memory (with 8TiB limit)
> as that will use another memslot?
I remember that was the workaround for now for some extremely large VMs
where you'd want a single NUMA node or a lot of memory for a single NUMA
node.
>
>
>>
>> In QEMU, we have
>>
>> static hwaddr kvm_max_slot_size = ~0;
>>
>> And only s390x sets
>>
>> kvm_set_max_memslot_size(KVM_SLOT_MAX_BYTES);
>>
>> with
>>
>> #define KVM_SLOT_MAX_BYTES (4UL * TiB)
> in QEMU default value is:
> static hwaddr kvm_max_slot_size = ~0
> it is kernel side that's failing
... and kvm_set_max_memslot_size(KVM_SLOT_MAX_BYTES) works around the
kernel limitation for s390x in user space.
I feel like the right thing would be to look into increasing the limit
in the kernel, and bail out if the kernel doesn't support it. Would
require a new kernel for starting gigantic VMs with a single large
memory backend, but then, it's a new use case.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2022-02-14 16:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.22.394.2202141048390.13781@anisinha-lenovo>
2022-02-14 12:36 ` 9 TiB vm memory creation Igor Mammedov
2022-02-14 14:37 ` David Hildenbrand
2022-02-14 15:55 ` Igor Mammedov
2022-02-14 16:32 ` David Hildenbrand [this message]
2022-02-15 7:00 ` Ani Sinha
2022-02-15 7:11 ` Ani Sinha
2022-02-15 7:29 ` Ani Sinha
2022-02-15 7:55 ` David Hildenbrand
2022-02-15 8:12 ` Ani Sinha
2022-02-15 8:38 ` David Hildenbrand
2022-02-15 9:40 ` Ani Sinha
2022-02-15 9:44 ` David Hildenbrand
2022-02-15 9:48 ` Ani Sinha
2022-02-15 9:51 ` David Hildenbrand
2022-02-15 10:44 ` Daniel P. Berrangé
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=2743ef0f-c73c-5a55-067b-6068c23334f3@redhat.com \
--to=david@redhat.com \
--cc=ani@anisinha.ca \
--cc=imammedo@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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).