Re: [PATCH] perf lock contention: Do not use BPF task local storage
From: Arnaldo Carvalho de Melo
Date: Wed Nov 23 2022 - 08:55:55 EST
Em Mon, Nov 21, 2022 at 09:32:56AM -0800, Martin KaFai Lau escreveu:
> On 11/18/22 11:01 AM, Namhyung Kim wrote:
> > It caused some troubles when a lock inside kmalloc is contended
> > because task local storage would allocate memory using kmalloc.
> > It'd create a recusion and even crash in my system.
> >
> > There could be a couple of workarounds but I think the simplest
> > one is to use a pre-allocated hash map.
>
> Acked-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>
Thanks, applied.
- Arnaldo
> > We could fix the task local storage to use the safe BPF allocator,
> > but it takes time so let's change this until it happens actually.
>
> I also got another report on the kfree_rcu path. I am also looking into
> this direction on using the BPF allocator.
--
- Arnaldo