Revert "Port: Tune Superslab Min-Keep and Shared Pool Soft Caps (04a60c316)"

This reverts commit d355041638.
This commit is contained in:
Moe Charm (CI)
2025-11-26 15:43:45 +09:00
parent d355041638
commit bea839add6
2 changed files with 5 additions and 14 deletions

View File

@ -15,18 +15,10 @@ void hkm_policy_init(void) {
pol->tiny_cap[1] = 1024;
pol->tiny_cap[2] = 768;
pol->tiny_cap[3] = 512;
pol->tiny_cap[4] = 512; // Loosened from 256 for Shared Pool
pol->tiny_cap[5] = 512; // Loosened from 256
pol->tiny_cap[6] = 256; // Loosened from 128
pol->tiny_cap[7] = 256; // C7 soft cap: Keep at 256 to force legacy fallback (legacy is 45x faster: 47M vs 1M ops/s)
// Tiny min-keep (per class Superslab reserve).
// C2-C6: Keep a few slabs to reduce mmap/munmap churn in mixed workloads.
for (int i = 0; i < 8; i++) pol->tiny_min_keep[i] = 0;
pol->tiny_min_keep[2] = 2; // 32B
pol->tiny_min_keep[3] = 2; // 64B
pol->tiny_min_keep[4] = 2; // 128B
pol->tiny_min_keep[5] = 1; // 256B
pol->tiny_min_keep[6] = 1; // 512B
pol->tiny_cap[4] = 256;
pol->tiny_cap[5] = 256;
pol->tiny_cap[6] = 128;
pol->tiny_cap[7] = 64;
// ========================================================================
// CAP初期値の設計思想:

View File

@ -14,7 +14,6 @@
typedef struct FrozenPolicy {
// Tiny (L0) reserved for future CAP tuning (not used by hot path yet)
uint16_t tiny_cap[8]; // classes 0..7
uint16_t tiny_min_keep[8]; // min slabs to keep (reduce mmap/munmap churn)
// L1 ACE MidPool (232KiB) and LargePool (64KiB1MiB)
uint16_t mid_cap[5]; // 2/4/8/16/32 KiB