Re: [PATCH v2 bpf-next] bpf: fix bpf_iter's task iterator logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 13, 2020 at 10:54 PM Andrii Nakryiko <andriin@xxxxxx> wrote:
>
> task_seq_get_next might stop prematurely if get_pid_task() fails to get
> task_struct. Failure to do so doesn't mean that there are no more tasks with
> higher pids. Procfs's iteration algorithm (see next_tgid in fs/proc/base.c)
> does a retry in such case. After this fix, instead of stopping prematurely
> after about 300 tasks on my server, bpf_iter program now returns >4000, which
> sounds much closer to reality.
>
> Cc: Yonghong Song <yhs@xxxxxx>
> Fixes: eaaacd23910f ("bpf: Add task and task/file iterator targets")
> Acked-by: Yonghong Song <yhs@xxxxxx>
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>

Applied. Thanks



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux