On Wed, Feb 26, 2025 at 08:03:23PM +0100, Oleg Nesterov wrote: > Sorry, didn't have time to actually read this patch, but after a quick > glance... > > On 02/26, Christian Brauner wrote: > > > > @@ -3949,7 +3955,7 @@ static int proc_task_readdir(struct file *file, struct dir_context *ctx) > > tid = (int)(intptr_t)file->private_data; > > file->private_data = NULL; > > for (task = first_tid(proc_pid(inode), tid, ctx->pos - 2, ns); > > - task; > > + task && !(task->flags & PF_USER_WORKER); > > unless I am totally confused this looks "obviously wrong". > > proc_task_readdir() should not stop if it sees a PF_USER_WORKER task, this > check should go into first_tid/next_tid. It's really a draft as I said. I'm more interested in whether this is a viable idea to separate kernel spawned workers into /proc/<pid>/worker and not show them in /proc/<pid>/task or if this is a non-starter. If so then I'll send an actual patch that also doesn't include code-duplication to no end. ;)