Re: [PATCH v1 0/5] percpu: partial chunk depopulation

From: Vlastimil Babka
Date: Wed Apr 07 2021 - 07:09:55 EST


On 4/1/21 11:42 PM, Roman Gushchin wrote:
> In our production experience the percpu memory allocator is sometimes struggling
> with returning the memory to the system. A typical example is a creation of
> several thousands memory cgroups (each has several chunks of the percpu data
> used for vmstats, vmevents, ref counters etc). Deletion and complete releasing
> of these cgroups doesn't always lead to a shrinkage of the percpu memory.
>
> The underlying problem is the fragmentation: to release an underlying chunk
> all percpu allocations should be released first. The percpu allocator tends
> to top up chunks to improve the utilization. It means new small-ish allocations
> (e.g. percpu ref counters) are placed onto almost filled old-ish chunks,
> effectively pinning them in memory.
>
> This patchset pretends to solve this problem by implementing a partial

Really "pretends"? :) Or did you mean "attempts"?