Skip to content

cputimers/proc: do_task_stat: don't walk through the thread list under ->siglock

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cputimers: thread_group_cputime: cleanup rcu/signal stuffkernel/posix-cpu-timers.c+7 -140 replies
1/4cputimers: do_task_stat: avoid ->siglock for while_each_thread()fs/proc/array.c+10 -81 reply
2/4cputimers: make sure thread_group_cputime() can't count the same thread twice locklesskernel/exit.c kernel/posix-cpu-timers.c+15 -52 replies
3/4cputimers: thread_group_times: make it rcu-safekernel/sched.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH -mm 0/4] cputimers/proc: do_task_stat: don't walk through the thread list under ->siglock
Quoted 3 lines · Oleg Nesterov

Yes sure. I dislike the do_task_stat() case because we always do this, even if this info is not needed, say, for /bin/ps.

Note also that nobody else in /fs/proc needs ->siglock. Except do_io_accounting(), but in this case the user-space explicitly asks for this info.

OK, This is V2. Still RFC, although I think 1/4 makes sense in any case.

Please comment. Again, I am more or less sure these changes are "correct", but I don't know what /bin/top can think ;)

I don't really like the fact thread_group_times() takes cputimer.lock, but imho lock_task_sighand() in do_task_stat() is much worse.

Oleg.