Skip to content

bpf: two fixes for bpf iterators

Yonghong Song bpf netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v12 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bpf: fix a rcu_sched stall issue with bpf task/task_file iteratorkernel/bpf/bpf_iter.c+14 -13 replies
2/3bpf: avoid visit same object multiple timeskernel/bpf/task_iter.c+2 -10 replies
3/3bpftool: handle EAGAIN error code properly in pids collectiontools/bpf/bpftool/pids.c+2 -01 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchAndrii Nakryiko
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf v2 0/3] bpf: two fixes for bpf iterators

Patch #1 fixed a rcu stall warning when traversing large number of tasks/files without overflowing seq_file buffer. The method is to control the number of visited objects in bpf_seq_read() so all bpf iterators will benefit.

Patch #2 calculated tid properly in a namespace in order to avoid visiting the name task multiple times.

Patch #3 handled read() error code EAGAIN properly in bpftool bpf_iter userspace code to collect pids. The change is needed due to Patch #1.

Yonghong Song (3):
bpf: fix a rcu_sched stall issue with bpf task/task_file iterator
bpf: avoid visit same object multiple times
bpftool: handle EAGAIN error code properly in pids collection

 kernel/bpf/bpf_iter.c    | 15 ++++++++++++++-
 kernel/bpf/task_iter.c   |  3 ++-
 tools/bpf/bpftool/pids.c |  2 ++
 3 files changed, 18 insertions(+), 2 deletions(-)
Signature · 1 line
2.24.1