Add Page Box layer for C7 class optimization
- Implement tiny_page_box.c/h: per-thread page cache between UC and Shared Pool - Integrate Page Box into Unified Cache refill path - Remove legacy SuperSlab implementation (merged into smallmid) - Add HAKMEM_TINY_PAGE_BOX_CLASSES env var for selective class enabling - Update bench_random_mixed.c with Page Box statistics Current status: Implementation safe, no regressions. Page Box ON/OFF shows minimal difference - pool strategy needs tuning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -5,6 +5,11 @@
|
||||
// TLS hint: last adopted SuperSlab/slab to avoid rescans
|
||||
#include "tiny_sticky.h"
|
||||
|
||||
// Tiny Page Box: C5〜C7 用 Tiny-Plus page pool(Superslab/Warm Pool より前段の箱)
|
||||
// tiny_tls_bind_slab() で新しい TLS Slab が bind されたタイミングで
|
||||
// tiny_page_box_on_new_slab() を呼び出し、Page Box 側の page pool を更新する。
|
||||
#include "box/tiny_page_box.h"
|
||||
|
||||
// Mailbox box
|
||||
#include "box/mailbox_box.h"
|
||||
|
||||
@ -363,6 +368,9 @@ static inline void tiny_tls_bind_slab(TinyTLSSlab* tls, SuperSlab* ss, int slab_
|
||||
tls->slab_idx = (uint8_t)slab_idx;
|
||||
tls->meta = &ss->slabs[slab_idx];
|
||||
tls->slab_base = tiny_slab_base_for(ss, slab_idx);
|
||||
|
||||
// Tiny Page Box にも新しい slab を通知しておく(C7 など有効クラスのみ)
|
||||
tiny_page_box_on_new_slab(tls);
|
||||
}
|
||||
|
||||
static inline uint32_t tiny_tls_default_refill(uint32_t cap) {
|
||||
|
||||
Reference in New Issue
Block a user