Skip to content

/proc/schedstat and /proc/sched_debug fail at 4096

Nathan Zimmer lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/24 patches 4 repliesIn review
  2. v1 posting 1/24 patches 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched: /proc/sched_stat fails on very very large machines.kernel/sched/stats.c+53 -202 replies
2/4sched: /proc/sched_debug fails on very very large machines.kernel/sched/debug.c+73 -111 reply
3/4timer_list: split timer_list_show_tickdeviceskernel/time/timer_list.c+9 -111 reply
4/4timer_list: Convert timer list to be a proper seq_file.kernel/time/timer_list.c+76 -120 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RESEND 0/4] /proc/schedstat and /proc/sched_debug fail at 4096

When running with 4096 cores attemping to read /proc/schedstat, /proc/sched_debug, /proc/timer_list will fail with an ENOMEM condition. On a sufficantly large systems the total amount of data is more then 4mb, so it won't fit into a single buffer. The failure can also occur on smaller systems when memory fragmentation is high as reported by Dave Jones. Also thanks to Al Viro for pointing me in the right direction with the iterator.

An solution considered but not tried for sched_stat and scheddebug would to be create an alternative mechanism to single_open but rather then calling *_show once it calls show once per possible cpu. If someone feels strongly that is the way to go I can give it a spin.

Nathan Zimmer (4):
sched: /proc/sched_stat fails on very very large machines.
sched: /proc/sched_debug fails on very very large machines.
timer_list: split timer_list_show_tickdevices
timer_list: Convert timer list to be a proper seq_file.

 kernel/sched/debug.c     |   84 +++++++++++++++++++++++++++++++++-----
 kernel/sched/stats.c     |   73 ++++++++++++++++++++++++---------
 kernel/time/timer_list.c |  100 +++++++++++++++++++++++++++++++++++++---------
 3 files changed, 207 insertions(+), 50 deletions(-)