Skip to content

RFC cputimers/proc: can't we make /proc/pid/stat less accurate?

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cputimers/proc: do_task_stat()->task_times() can race with getrusage()fs/proc/array.c+2 -114 replies
2/2cputimers/proc: do_task_stat()->thread_group_times() is racy and O(n) under ->siglockfs/proc/array.c+5 -14 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC,PATCH 0/2] cputimers/proc: can't we make /proc/pid/stat less accurate?

Mostly to provoke the discussion and untested, please comment.

In short: I do not actually know if /proc/pid/stat should be "really" accurate wrt cpu accounting. I mean, I don't know how much /bin/top and friends depend on xtime monotonicity.

However, it is sad that /proc/pid/stat iterates over ->thread_group _twice_ under ->siglock.

Any thoughts?

Oleg.