From 57e67d6c2fa914c2da176ba4f0857b086794e306 Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Mon, 20 Jul 2026 01:21:21 +0800 Subject: [PATCH] numa: skip binding the GPU-prefix staging slabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VRAM-ranked prefix's host slabs are upload staging — read once and freed right after — so binding them buys nothing and cost ~2 transient VMAs each: measured PEAK maps 28,958 on the six-GPU host even with the pin arenas in place. With the skip: 11,771, all of it the bounded LRU ecache, which serves decode reads and stays correctly bound. --- c/colibri.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/c/colibri.c b/c/colibri.c index 20086b0..20c65da 100644 --- a/c/colibri.c +++ b/c/colibri.c @@ -567,10 +567,13 @@ static int g_disk_split=0; /* DISK_SPLIT=1: contatori che spezzano i DISK LOAD ( * there is nothing to migrate. */ #ifdef __linux__ static int g_numa_nodes=0; /* only touched under __linux__; off-Linux NUMA is a no-op */ +static int g_numa_skip_bind=0; /* raised around the GPU-prefix pin load: those slabs are + * upload staging, freed right after — binding them buys + * nothing and costs ~2 transient VMAs each (#419) */ #endif static void numa_slab_bind(void *p, size_t n){ #ifdef __linux__ - if(g_numa_nodes<2 || !p || !n) return; + if(g_numa_nodes<2 || g_numa_skip_bind || !p || !n) return; unsigned long mask=(1UL<0) g_numa_skip_bind=1; /* prefix slabs = transient upload staging: don't bind (#419) */ +#endif #pragma omp parallel for schedule(dynamic,1) for(int a=0;a<(gpu_prefix?gpu_prefix:npin);a++) expert_load(m,r[a].l,r[a].e,&m->pin[r[a].l][slot_of[a]],1,0); /* startup pin load; demand=0, never classified */ +#ifdef __linux__ + g_numa_skip_bind=0; +#endif m->resident_bytes+=(int64_t)(gpu_prefix?gpu_prefix:npin)*eb; #ifdef COLI_CUDA if(g_cuda_enabled && budget>0){