[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQ+QyPqi7XJ2p=S9FVDbOxMXvVPU859n+2ApuRQv5T2S5w@mail.gmail.com>
Date: Tue, 17 Jun 2025 08:55:02 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Matt Fleming <matt@...dmodwrite.com>
Cc: Song Liu <song@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, bpf <bpf@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team <kernel-team@...udflare.com>,
Matt Fleming <mfleming@...udflare.com>
Subject: Re: [PATCH] bpf: Call cond_resched() to avoid soft lockup in trie_free()
On Tue, Jun 17, 2025 at 2:43 AM Matt Fleming <matt@...dmodwrite.com> wrote:
>
> On Mon, Jun 16, 2025 at 4:51 PM Song Liu <song@...nel.org> wrote:
> >
> > On Mon, Jun 16, 2025 at 2:55 AM Matt Fleming <matt@...dmodwrite.com> wrote:
> > >
> > > From: Matt Fleming <mfleming@...udflare.com>
> > >
> > > Calls to kfree() in trie_free() can be expensive for KASAN-enabled
> > > kernels. This can cause soft lockup warnings when traversing large maps,
> >
> > I think this could also happen to KASAN-disabled kernels, so the commit log
> > is a bit misleading.
>
> This issue can definitely affect KASAN-disabled kernels.
>
> I mentioned KASAN to give context and explain why I saw this and
> nobody else seems to have reported it. I'm happy to reword this part
> of the commit message if needed but I still think it should mention
> KASAN somewhere because that's the reason I discovered it.
kfree is so slow that it triggers softlock up ?
> soft lockup - CPU#41 stuck for 76s
How many elements are in the trie that it takes 76 seconds??
I feel the issue is different.
It seems the trie_free() algorithm doesn't scale.
Pls share a full reproducer.
pw-bot: cr
Powered by blists - more mailing lists