[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADa=RywQPwBib1MKs3+TFK4K6yh8sd2UkERkU5bzHZ9VS77hyw@mail.gmail.com>
Date: Wed, 15 Mar 2023 18:22:18 -0700
From: Joe Stringer <joe@...valent.com>
To: Maxim Mikityanskiy <maxtram95@...il.com>
Cc: bpf@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, ast@...nel.org, corbet@....net,
martin.lau@...ux.dev, bagasdotme@...il.com
Subject: Re: [PATCH bpf-next v3] docs/bpf: Add LRU internals description and graph
On Tue, Mar 14, 2023 at 6:55 AM Maxim Mikityanskiy <maxtram95@...il.com> wrote:
>
> On Sun, Mar 12, 2023 at 12:05:59PM -0700, Joe Stringer wrote:
<snip>
> I believe there are some inaccuracies, though. As far as I see it,
> local_freelist_check corresponds to __local_list_pop_free in the common
> LRU case, specifically, to checking its return value; use_local_node
> corresponds to returning that value; and common_lru_check corresponds
> to bpf_lru_pop_free (for both common and percpu LRU, that's where the
> distinction is made).
Ah yes, thanks for the pointers, will fix up. I started with reviewing
the shared case since I was primarily interested in the behaviour
there, then I added the other cases later. Adding the function names
was one of the later ideas but it's difficult to get accurate.
> > + local_freelist_check [shape=diamond,fillcolor=1,
> > + label="Local freelist\nnode available?"];
> > + // The following corresponds to __local_list_pop_free() for common LRU case.
> > + use_local_node [shape=rectangle,
> > + label="Use node owned\nby this CPU"]
> > +
> > + common_lru_check [shape=diamond,
> > + label="Map created with\ncommon LRU?\n(!BPF_NO_COMMON_LRU)"];
>
> Nit: the exact flag name is BPF_F_NO_COMMON_LRU.
Will fix.
> Thanks again for this patch, this piece of documentation really helped
> me understand internals of the LRU hashmap.
Glad to hear, thanks for the feedback on the patch!
Powered by blists - more mailing lists