On 07/19/16 02:57, 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. IA32 SDM does suggest to program MTRRs in parallel mode.
> 
> Cc: Michael Kinney <[email protected]>
> Cc: Feng Tian <[email protected]>
> Cc: Laszlo Ersek <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <[email protected]>
> Reviewed-by: Feng Tian <[email protected]>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index daf97bd..78b2c88 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -1,7 +1,7 @@
>  /** @file
>    CPU DXE Module.
>  
> -  Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the BSD 
> License
>    which accompanies this distribution.  The full text of the license may be 
> found at
> @@ -422,7 +422,7 @@ CpuSetMemoryAttributes (
>        MpStatus = MpService->StartupAllAPs (
>                                MpService,          // This
>                                SetMtrrsFromBuffer, // Procedure
> -                              TRUE,               // SingleThread
> +                              FALSE,              // SingleThread
>                                NULL,               // WaitEvent
>                                0,                  // TimeoutInMicrosecsond
>                                &MtrrSettings,      // ProcedureArgument
> 

For the patch itself:

Reviewed-by: Laszlo Ersek <[email protected]>

I think it would be preferable to reverse the order of patch #2 and
patch #1 in this series, so that when you flip the above to
multi-threaded, the library instance is already safe to use like that.

This reordering can be done before you commit the patches, of course.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to