Re: [PATCH 3/3 v4 bpf-next] bpf: optimize task iteration

2020-12-18 Thread Andrii Nakryiko
On Fri, Dec 18, 2020 at 12:47 PM Jonathan Lemon wrote: > > From: Jonathan Lemon > > Only obtain the task reference count at the end of the RCU section > instead of repeatedly obtaining/releasing it when iterating though > a thread group. > > Jump to the correct branch when it is known that the ta

[PATCH 3/3 v4 bpf-next] bpf: optimize task iteration

2020-12-18 Thread Jonathan Lemon
From: Jonathan Lemon Only obtain the task reference count at the end of the RCU section instead of repeatedly obtaining/releasing it when iterating though a thread group. Jump to the correct branch when it is known that the task is NULL. Signed-off-by: Jonathan Lemon --- kernel/bpf/task_iter.