Re: [PATCH bpf-next 1/7] bpf: use common jump (instruction) history across all states

Alexei Starovoitov
2023-11-09T19:29:29Z

On Thu, Nov 9, 2023 at 9:28 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
>
> If we ever break DFS property, we can easily change this. Or we can
> even have a hybrid: as long as traversal preserves DFS property, we
> use global shared history, but we can also optionally clone and have
> our own history if necessary. It's a matter of adding optional
> potentially NULL pointer to "local history". All this is very nicely
> hidden away from "normal" code.

If we can "easily change this" then let's make it last and optional patch.
So we can revert in the future when we need to take non-DFS path.

> But again, let's look at data first. I'll get back with numbers soon.

Sure. I think memory increase due to more tracking is ok.
I suspect it won't cause 2x increase. Likely few %.
The last time I checked the main memory hog is states stashed for pruning.