From: "Ni, Ray" <ray.ni@intel.com>
To: "Xu, Min M" <min.m.xu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>
Cc: "Gao, Jiaqi" <jiaqi.gao@intel.com>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Bi, Dandan" <dandan.bi@intel.com>,
"Aktas, Erdem" <erdemaktas@google.com>,
"James Bottomley" <jejb@linux.ibm.com>,
"Yao, Jiewen" <jiewen.yao@intel.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [edk2-devel] [PATCH V2 14/14] MdeModulePkg: Pool and page functions accept memory when OOM occurs
Date: Tue, 30 Aug 2022 06:14:39 +0000 [thread overview]
Message-ID: <MWHPR11MB1631A17217089DA2DFC083CA8C799@MWHPR11MB1631.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH0PR11MB50643FCA99EFA94D03EF3650C5799@PH0PR11MB5064.namprd11.prod.outlook.com>
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@intel.com>
> Sent: Tuesday, August 30, 2022 2:01 PM
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io;
> thomas.lendacky@amd.com
> Cc: Gao, Jiaqi <jiaqi.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Gao, Liming <gaoliming@byosoft.com.cn>; Bi, Dandan
> <dandan.bi@intel.com>; Aktas, Erdem <erdemaktas@google.com>; James
> Bottomley <jejb@linux.ibm.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Gerd Hoffmann <kraxel@redhat.com>; Xu, Min M <min.m.xu@intel.com>
> 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
next prev parent reply other threads:[~2022-08-30 6:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 6:21 [PATCH V2 00/14] Introduce Lazy-accept for Tdx guest Min Xu
2022-08-27 6:21 ` [PATCH V2 01/14] MdeModulePkg: Add PrePiHob.h Min Xu
2022-09-01 15:47 ` Gerd Hoffmann
2022-09-01 23:34 ` Min Xu
2022-09-04 11:34 ` Min Xu
2022-09-07 5:30 ` Gerd Hoffmann
2022-09-07 23:56 ` [edk2-devel] " Min Xu
2022-08-27 6:21 ` [PATCH V2 02/14] MdePkg: Increase EFI_RESOURCE_MAX_MEMORY_TYPE Min Xu
2022-08-27 6:21 ` [PATCH V2 03/14] OvmfPkg: Use EFI_RESOURCE_MEMORY_UNACCEPTED which defined in MdeModulePkg Min Xu
2022-08-27 6:21 ` [PATCH V2 04/14] MdePkg: Add UEFI Unaccepted memory definition Min Xu
2022-08-27 6:21 ` [PATCH V2 05/14] MdeModulePkg: Update Dxe to handle unaccepted memory type Min Xu
2022-08-27 6:21 ` [PATCH V2 06/14] ShellPkg: Update shell command memmap to show unaccepted memory Min Xu
2022-09-01 15:50 ` Gerd Hoffmann
2022-08-27 6:21 ` [PATCH V2 07/14] OvmfPkg: Add PCD and DEFINEs for Lazy Accept page Min Xu
2022-09-01 15:56 ` Gerd Hoffmann
2022-09-01 23:33 ` [edk2-devel] " Min Xu
2022-09-02 5:30 ` Gerd Hoffmann
2022-08-27 6:21 ` [PATCH V2 08/14] OvmfPkg: Add MaxAcceptedMemoryAddress in TDX work area Min Xu
2022-08-27 6:21 ` [PATCH V2 09/14] OvmfPkg: Introduce lazy accept in PlatformInitLib and PlatformPei Min Xu
2022-08-27 6:21 ` [PATCH V2 10/14] OvmfPkg: Update ConstructFwHobList for lazy accept Min Xu
2022-08-27 6:21 ` [PATCH V2 11/14] MdePkg: The prototype definition of EdkiiMemoryAcceptProtocol Min Xu
2022-09-01 15:57 ` Gerd Hoffmann
2022-08-27 6:21 ` [PATCH V2 12/14] OvmfPkg: Realize EdkiiMemoryAcceptProtocol in TdxDxe Min Xu
2022-09-01 15:58 ` Gerd Hoffmann
2022-08-27 6:21 ` [PATCH V2 13/14] OvmfPkg: Call gEdkiiMemoryAcceptProtocolGuid to accept pages Min Xu
2022-09-01 15:59 ` Gerd Hoffmann
2022-08-27 6:21 ` [PATCH V2 14/14] MdeModulePkg: Pool and page functions accept memory when OOM occurs Min Xu
2022-08-29 20:47 ` Lendacky, Thomas
2022-08-30 0:29 ` [edk2-devel] " Ni, Ray
2022-08-30 6:00 ` Min Xu
2022-08-30 6:14 ` Ni, Ray [this message]
2022-08-30 6:35 ` Min Xu
2022-08-30 7:12 ` Ni, Ray
2022-08-30 7:30 ` Min Xu
2022-08-30 7:43 ` Ni, Ray
2022-08-30 8:08 ` Min Xu
2022-08-30 9:28 ` Ni, Ray
[not found] ` <17100F9FBCB0C570.28430@groups.io>
2022-08-30 7:47 ` Ni, Ray
2022-08-30 3:20 ` Min Xu
2022-08-30 14:24 ` Lendacky, Thomas
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=MWHPR11MB1631A17217089DA2DFC083CA8C799@MWHPR11MB1631.namprd11.prod.outlook.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