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


Ni, Ray
 

Min,
My understanding is there is a TDX driver in DXE phase that accepts memory using MP protocol.
We only need to make sure there is sufficient memory for code running before that point.
Is my understanding correct?

Thanks,
Ray

-----Original Message-----
From: Xu, Min M <min.m.xu@...>
Sent: Tuesday, August 30, 2022 2:01 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@...>; Xu, Min M <min.m.xu@...>
Subject: RE: [edk2-devel] [PATCH V2 14/14] MdeModulePkg: Pool and page
functions accept memory when OOM occurs

On August 30, 2022 8:29 AM, Ni, Ray wrote:
Can you please explain more about this patch?
I am a little nervous when seeing patches that change the fundamental
memory services.
With the introduction of lazy-page-accept, the OUT_OF_RESOURCE may
occur in Memory Allocation logic (MdeModulePkg/Core/Dxe/Mem). To
address this issue, this patch update the
CoreAllocatePages()/CoreAllocatePool() so that when OUT_OF_RESOURCE is
triggered, we can accept more unaccepted-memory with the help of
EdkiiMemoryAcceptProtocol.

Please refer to slide7-10 in
https://edk2.groups.io/g/devel/files/Designs/2021/0830/ . It describes how
the AcceptMemoryResource works.

You can also refer to the discussion in
https://edk2.groups.io/g/devel/message/79971.

Thanks
Min

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