From: "Paweł Poławski" <ppolawsk@redhat.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Dong, Eric" <eric.dong@intel.com>,
Laszlo Ersek <lersek@redhat.com>, "Ni, Ray" <ray.ni@intel.com>,
"Kumar, Rahul R" <rahul.r.kumar@intel.com>
Subject: Re: [edk2-devel] 1024 VCPU limitation
Date: Tue, 15 Nov 2022 00:00:49 +0100 [thread overview]
Message-ID: <CABchEG1v=-NFir-L+bfOGF0wEb8k7BvwBWXLqa_QKkkchpvLrA@mail.gmail.com> (raw)
In-Reply-To: <CO1PR11MB49297E624B7744E87C17E881D23C9@CO1PR11MB4929.namprd11.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 3712 bytes --]
Hi Michael,
Thank you for the fast response and suggestion on how to resolve the issue.
I am trying to build a custom qemu (as qemu has its own limitations) to
verify if a fix will work.
Best regards,
Pawel
On Mon, Nov 7, 2022 at 6:28 PM Kinney, Michael D <michael.d.kinney@intel.com>
wrote:
> Hi Pawel,
>
>
>
> I see the following union involved in the size of this structure.
>
>
>
> typedef union {
>
> IA32_HANDOFF_STATUS IA32HealthFlags;
>
> X64_HANDOFF_STATUS x64HealthFlags;
>
> ITANIUM_HANDOFF_STATUS ItaniumHealthFlags;
>
> } EFI_SEC_PLATFORM_INFORMATION_RECORD;
>
>
>
> IA32 is 4 bytes per CPU
>
> X64 is 4 bytes per CPU
>
> Itanium is 56 bytes per CPU
>
>
>
> We have removed the Itanium content from edk2 repo and it look like we
> missed this
>
> union.
>
>
>
> If you comment out the following line from the union does it resolve the
> issue?
>
>
>
>
> https://github.com/tianocore/edk2/blob/7c0ad2c33810ead45b7919f8f8d0e282dae52e71/MdePkg/Include/Ppi/SecPlatformInformation.h#L137
>
>
>
> I know this only increases the total number of CPUs that can be handled by
> a single 64kb HOB, so we would run into
>
> it again at a higher number of CPUs. However, I think this gets the
> overhead per CPU down to 8 bytes, which should
>
> scale to about 8091 CPUs.
>
>
>
> Thanks,
>
>
>
> Mike
>
>
>
>
>
> *From:* Pawel Polawski <ppolawsk@redhat.com>
> *Sent:* Monday, November 7, 2022 3:52 AM
> *To:* devel@edk2.groups.io
> *Cc:* Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>;
> Ni, Ray <ray.ni@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>
> *Subject:* [edk2-devel] 1024 VCPU limitation
>
>
>
> Hi All,
>
>
>
> I am trying to run edk2 with more than 1024 VCPU. It looks like it is not
> possible
>
> at the moment and results in an ASSERT trigger.
>
>
>
> In the past the topic has been analyzed by Laszlo Ersek [1]. It turns out
> that the limit
>
> is result of HOB default allocation being limited to ~64KB, quoting
> original email thread:
>
>
>
> """
>
> If "NumberOfProcessors" is large enough, such as ~1024, then
> "BistInformationSize" will exceed ~64KB, and PeiServicesAllocatePool()
> will fail with EFI_OUT_OF_RESOURCES. The reason is that pool allocations
> in PEI are implemented with memory alloaction HOBs, and HOBs can't be
> larger than ~64KB. (See PeiAllocatePool() in
> "MdeModulePkg/Core/Pei/Memory/MemoryServices.c".)
>
> """
>
>
>
> Even with HOB allocation being changed, I am afraid it may break some
>
> compatibility on the DXE level. This is the reason I am looking for a more
> universal solution.
>
> I believe the same limitation exists for the physical x86 platforms with
> more than 1024 CPU.
>
>
>
> If someone has encountered the same issue or has knowledge that workaround
> / solution for
>
> this already exists or is being developed?
>
>
>
> [1]
> https://listman.redhat.com/archives/edk2-devel-archive/2021-June/msg01493
>
>
>
> Best regards,
>
> Pawel
>
>
> --
>
> *Paweł Poławski*
>
> Red Hat <https://www.redhat.com/> Virtualization
>
> ppolawsk@redhat.com
>
> @RedHat <https://twitter.com/redhat> Red Hat
> <https://www.linkedin.com/company/red-hat> Red Hat
> <https://www.facebook.com/RedHatInc>
>
> <https://red.ht/sig>
>
--
Paweł Poławski
Red Hat <https://www.redhat.com/> Virtualization
ppolawsk@redhat.com
@RedHat <https://twitter.com/redhat> Red Hat
<https://www.linkedin.com/company/red-hat> Red Hat
<https://www.facebook.com/RedHatInc>
<https://red.ht/sig>
[-- Attachment #2: Type: text/html, Size: 12382 bytes --]
next prev parent reply other threads:[~2022-11-14 23:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 11:51 [edk2-devel] 1024 VCPU limitation Paweł Poławski
2022-11-07 17:28 ` Michael D Kinney
2022-11-14 23:00 ` Paweł Poławski [this message]
2022-11-14 23:29 ` Pedro Falcato
2022-11-15 0:29 ` Michael D Kinney
2022-11-30 0:00 ` Paweł Poławski
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-list 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='CABchEG1v=-NFir-L+bfOGF0wEb8k7BvwBWXLqa_QKkkchpvLrA@mail.gmail.com' \
--to=devel@edk2.groups.io \
/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