On Wed, Mar 6, 2024 at 6:01 PM Lameter, Christopher <cl@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Wed, 28 Feb 2024, Eric Dumazet wrote: > > >> __sk_mem_raise_allocated() drops to 0.4%. > > > > I suspect some kind of flow/cpu steering issues then. > > Also maybe SO_RESERVE_MEM would be better for this workload. > > This is via loopback. So there is a flow steering issue in the IP > stack? Asymmetric allocations / freeing, things that will usually have a high cost for payload copy anyway. Maybe a hierarchical tracking would avoid false sharings if some arches pay a high price to them. - One per-cpu reserve. (X MB) - One per-memory-domain reserve. (number_of_cpu_in_this_domain * X MB) - A global reserve, with an uncertainty of number_of_cpus * X MB Basically reworking lib/percpu_counter.c for better NUMA awareness.