[edk2-devel] [PATCH v2] UefiCpuPkg/PiSmmCpuDxeSmm: Avoid allocate Token every time.

Ni, Ray via Groups.Io ray.ni=intel.com at groups.io
Fri Nov 29 01:22:21 UTC 2019


> 
> I suggest that we introduce a new PCD for "token count per chunk", and
> set the default value to 1, in the DEC file. (And we should copy the PCD
> into a global variable, in InitializeDataForMmMp().)
> 
> This way, if a platform suddenly starts consuming tokens, it will work
> (there will always be a single available token). If they want to improve
> performance (using a chunked allocation style), they can set the PCD as
> they see fit.
> 

Laszlo,
I agree with you to use to PCD for "token count per chunk".
But I suggest the default value of that PCD can be at least 64.
Reasons:
1. MM_MP is the new MP protocol in SMM environment and we expect
    all SMM code start to use the new protocol instead of the original StartupThisAp
    service exposed through SMM System table.
2. A value of 1 is totally to disable the pre-allocating. I prefer this
    pre-allocating is activated by default given the reason #1.

64 * 32/64 (SPIN LOCK size) = 2KB/4KB is not a big size.

Thanks,
Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51481): https://edk2.groups.io/g/devel/message/51481
Mute This Topic: https://groups.io/mt/63850169/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list