Re: [EXT.MSG] Re: [PATCH RFC bpf-next 0/2] bpf: Do not let preemption cause false recursion drops in trampoline progs
From: Mike Bazov
Date: Tue Nov 03 2026 - 16:32:10 EST
On Tue, Nov 03, 2026 at 01:49 AM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
> No. I don't think we can switch to per-task that easily.
> For your use case try fsession. It was added specifically to match entry/exit.
Thanks! fsession does keep entry and exit consistent. It doesn't recover
the skipped runs though. I ran the selftest scenario with an fsession
prog on __set_task_comm (7.0 kernel, lazy preemption, 20 rounds): Task
B's entry and exit runs were both skipped in every round (entry_b=0,
exit_b=0, recursion_misses=40), since each run still goes through
prog->active while Task A is preempted mid-program.
What is the main obstacle to per-task tracking?
And if per-task is not an option, do you have another approach
in mind so that runs of unrelated tasks are not skipped?