[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANt8P=uyGF_QvpcW+BkHzPvdo-5cdH7OXw2Ozt1gFuXHmdizwQ@mail.gmail.com>
Date: Tue, 2 Mar 2021 13:56:46 +0800
From: Shu Ming <sming56@...il.com>
To: Xunlei Pang <xlpang@...ux.alibaba.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Christoph Lameter <cl@...ux.com>,
Wen Yang <wenyang@...ux.alibaba.com>,
Roman Gushchin <guro@...com>, Pekka Enberg <penberg@...il.com>,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
David Rientjes <rientjes@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH v2 3/3] mm/slub: Use percpu partial free counter
On Mon, Aug 10, 2020 at 8:22 PM Xunlei Pang <xlpang@...ux.alibaba.com> 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;
> }
Powered by blists - more mailing lists