Re: [edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-12 Thread Laszlo Ersek
On 07/12/16 13:58, Fan, Jeff wrote: > Laszlo, > > I think of it. We could just remove the MtrrDebugPrintAllMtrrs() call from > MtrrSetAllMtrrs() implementation in MtrrLib. > > The reason is that Aps' MTRR settings should be always same with the BPS's. > BSP will set the MTRRs setting by

Re: [edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-12 Thread Fan, Jeff
Laszlo, I think of it. We could just remove the MtrrDebugPrintAllMtrrs() call from MtrrSetAllMtrrs() implementation in MtrrLib. The reason is that Aps' MTRR settings should be always same with the BPS's. BSP will set the MTRRs setting by MtrrSetMemoryAttribute() or other APIs. And Aps will

Re: [edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-08 Thread Laszlo Ersek
On 07/08/16 10:59, Fan, Jeff wrote: > Laszlo, > > Thanks your feedback and provided the history on MTRRs sync code. > > DEBUG () running on Aps is a common issue to be avoided. > For MtrrLib, DEBUG() is using DEBUG_CACHE for debug purpose only. > Usually, MTRRs setting should be same between

Re: [edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-08 Thread Fan, Jeff
Laszlo, Thanks your feedback and provided the history on MTRRs sync code. DEBUG () running on Aps is a common issue to be avoided. For MtrrLib, DEBUG() is using DEBUG_CACHE for debug purpose only. Usually, MTRRs setting should be same between BSP/Aps. Dump MTRRs are enough for BSP. Maybe, we

Re: [edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-08 Thread Laszlo Ersek
Jeff, On 07/08/16 09:45, Jeff Fan wrote: > SetMemoryAttributes() will sync BSP's MTRRs settings to all APs by > StartupAllAPs > service in serial mode. It may caused much performance impact if there are too > much processors in system. This update is to invoke StartupAllAps in parallel > mode.

[edk2] [Patch] UefiCpuPkg/CpuDxe: StartupAllAPs in parallel mode

2016-07-08 Thread Jeff Fan
SetMemoryAttributes() will sync BSP's MTRRs settings to all APs by StartupAllAPs service in serial mode. It may caused much performance impact if there are too much processors in system. This update is to invoke StartupAllAps in parallel mode. IA32 SDM does suggest to program MTRRs in parallel