Re: [PATCH v2 3/3] mm/slub: Use percpu partial free counter

From: Shu Ming
Date: Tue Mar 02 2021 - 03:16:32 EST


On Mon, Aug 10, 2020 at 8:22 PM Xunlei Pang <xlpang@xxxxxxxxxxxxxxxxx> wrote:

> static inline void
> @@ -2429,12 +2439,12 @@ static unsigned long partial_counter(struct kmem_cache_node *n,
> unsigned long ret = 0;
>
> if (item == PARTIAL_FREE) {
> - ret = atomic_long_read(&n->partial_free_objs);
> + ret = get_partial_free(n);
> } else if (item == PARTIAL_TOTAL) {
> ret = atomic_long_read(&n->partial_total_objs);
> } else if (item == PARTIAL_INUSE) {
> ret = atomic_long_read(&n->partial_total_objs) -
> - atomic_long_read(&n->partial_free_objs);
> + get_partial_free(n);

Is it "ret = get_partial_free(n);" above?


> if ((long)ret < 0)
> ret = 0;
> }