cputimers/proc: do_task_stat: don't walk through the thread list under ->siglock
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | cputimers: thread_group_cputime: cleanup rcu/signal stuffkernel/ | +7 | 0 replies | |
| 1/4 | cputimers: do_task_stat: avoid ->siglock for while_each_thread()fs/ | +10 | 1 reply | |
| 2/4 | cputimers: make sure thread_group_cputime() can't count the same thread twice locklesskernel/ kernel/ | +15 | 2 replies | |
| 3/4 | cputimers: thread_group_times: make it rcu-safekernel/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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.