There's a great performance down if we enable heap guard features.
This feature will frequently update page attribute to set/unset guard
pages, which is done by CpuArchProtocol.SetMemoryAttributes. In the
implementation of this method (in CpuDxe), it will call
MpProtocol.StartupAllAps() to flush TLB for all APs after updating
page attributes. We found that StartupAllAps() will spend a lot of
time to complete the flush operation. For example, listing a folder
content in shell will take 55s to complete. Normally it should take
less than 5s.
The solution is removing the flush operation for AP in CpuDxe driver
but let AP do it in its own wakeup code. There's no need to flush TLB
for AP who has no chance to run code.
Jian J Wang (2):
UefiCpuPkg/MpInitLib: force flushing TLB for AP in mwait loop mode
UefiCpuPkg/CpuDxe: remove all code to flush TLB for APs
UefiCpuPkg/CpuDxe/CpuPageTable.c | 85 +++---------------------------------
UefiCpuPkg/Library/MpInitLib/MpLib.c | 6 +++
2 files changed, 11 insertions(+), 80 deletions(-)
--
2.15.1.windows.2
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel