lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/3] mm/slub: Use percpu partial free counter
On Mon, Aug 10, 2020 at 8:22 PM Xunlei Pang <xlpang@linux.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;
> }

\
 
 \ /
  Last update: 2021-03-02 16:10    [W:0.310 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site