[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQK1zH4sByPUN-+58P4n3XUzdKZJVunu7t5u+07T61gv=Q@mail.gmail.com>
Date: Thu, 18 Jun 2020 14:48:46 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: Martin KaFai Lau <kafai@...com>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: sk_storage: Prefer to get a free cache_idx
On Wed, Jun 17, 2020 at 10:01 PM John Fastabend
<john.fastabend@...il.com> wrote:
>
> Martin KaFai Lau wrote:
> > The cache_idx is currently picked by RR. There is chance that
> > the same cache_idx will be picked by multiple sk_storage_maps while
> > other cache_idx is still unused. e.g. It could happen when the
> > sk_storage_map is recreated during the restart of the user
> > space process.
> >
> > This patch tracks the usage count for each cache_idx. There is
> > 16 of them now (defined in BPF_SK_STORAGE_CACHE_SIZE).
> > It will try to pick the free cache_idx. If none was found,
> > it would pick one with the minimal usage count.
> >
> > Signed-off-by: Martin KaFai Lau <kafai@...com>
> > ---
> > net/core/bpf_sk_storage.c | 41 +++++++++++++++++++++++++++++++++++----
> > 1 file changed, 37 insertions(+), 4 deletions(-)
> >
>
> Acked-by: John Fastabend <john.fastabend@...il.com>
Applied. Thanks
Powered by blists - more mailing lists