diff options
author | Liming Gao <liming.gao@intel.com> | 2016-04-08 14:34:03 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-06 16:19:33 +0800 |
commit | e0c2a80c279c626f9550bc856f8a714ab8fbd937 (patch) | |
tree | 96af95f98031bed5ca2092ca0d778bb10eaf40c7 /MdeModulePkg/Core | |
parent | 2415f51ea04418a47f96c11b3c5a4bc93f379cad (diff) | |
download | edk2-platforms-e0c2a80c279c626f9550bc856f8a714ab8fbd937.tar.xz |
MdeModulePkg: DxeCore MemoryPool Algorithm Update
Use 128 bytes as the start size region to be same to previous one.
64 bytes is small as the first range. On X64 arch, POOL_OVERHEAD
takes 40 bytes, the pool data less than 24 bytes can be fit into
it. But, the real allocation is few that can't reduce its free pool
link list. And, the second range (64~128) has more allocation
that also increases the free pool link list of the first range.
Then, the link list will become longer and longer. When LinkList
check enable in DEBUG tip, the long link list will bring the
additional overhead and bad performance. Here is the performance
data collected in our X64 platform with DEBUG enable.
64 byte: 22 seconds in BDS phase
128 byte: 19.6 seconds in BDS phase
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
(cherry picked from commit 467d5f6b30bcd2bb73bfaafc31118944d95ec28e)
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/Pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index e5fee1abfc..fc08159d52 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -52,7 +52,7 @@ typedef struct { // as we would in a strict power-of-2 sequence
//
STATIC CONST UINT16 mPoolSizeTable[] = {
- 64, 128, 192, 320, 512, 832, 1344, 2176, 3520, 5696, 9216, 14912, 24128
+ 128, 256, 384, 640, 1024, 1664, 2688, 4352, 7040, 11392, 18432, 29824
};
#define SIZE_TO_LIST(a) (GetPoolIndexFromSize (a))
|