Re: [PATCH 10/17] proc/fd: In proc_readfd_common use fnext_task

From: Alexei Starovoitov
Date: Tue Aug 18 2020 - 00:59:36 EST


On Mon, Aug 17, 2020 at 8:46 PM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>
> I am definitely willing to look at it. Do we think there would be enough
> traffic on task_lock from /proc/<pid>/fd access to make it work doing?

not from /proc, but bpf iterator in kernel/bpf/task_iter.c that is
being modified
in the other patch is used to process 100+k tasks. The faster it can go
through them the better. We don't see task spin_lock being a bottleneck though.
To test it just do 'bpftool prog show'. It will use task iterator undercover.