Re: [PATCH V2 14/14] MdeModulePkg: Pool and page functions accept memory when OOM occurs


Ni, Ray
 

I saw the justification of this is to support different size of Linux kernel images.
But that's after TD DXE driver.
For code running before TD DXE driver, the memory needs is predicable, right?

-----Original Message-----
From: Xu, Min M <min.m.xu@...>
Sent: Tuesday, August 30, 2022 2:35 PM
To: Ni, Ray <ray.ni@...>; devel@edk2.groups.io;
thomas.lendacky@...
Cc: Gao, Jiaqi <jiaqi.gao@...>; Wang, Jian J <jian.j.wang@...>;
Gao, Liming <gaoliming@...>; Bi, Dandan
<dandan.bi@...>; Aktas, Erdem <erdemaktas@...>; James
Bottomley <jejb@...>; Yao, Jiewen <jiewen.yao@...>;
Gerd Hoffmann <kraxel@...>
Subject: RE: [edk2-devel] [PATCH V2 14/14] MdeModulePkg: Pool and page
functions accept memory when OOM occurs

On August 30, 2022 2:15 PM, Ni Ray wrote:
Min,
My understanding is there is a TDX driver in DXE phase that accepts
memory
using MP protocol.
EdkiiMemoryAcceptProtocol is a protocol which accept memories. It is
implemented/installed by the platform drivers, such as TdxDxe driver, or SEV
driver.
It is up to the platform driver (Tdx or SEV driver) if MP protocol is used.
We only need to make sure there is sufficient memory for code running
before that point.
Is my understanding correct?
That's right. But we'd better accept sufficient memory for the whole DXE
phase. If OOM is triggered it's better accept more memory than the size
needed. In current implementation we accept the memory in units of 32MB.

Thanks
Min

Join devel@edk2.groups.io to automatically receive all group messages.