Skip to content

RFC Per-task delay accounting

Shailabh Nagar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5nanosecond timestamps and diffsinclude/linux/time.h kernel/time.c+38 -012 replies
2/5Per-task delay accounting: Initialization, dynamic turn on/offDocumentation/kernel-parameters.txt include/linux/delayacct.h include/linux/sched.h +6 more+106 -00 replies
3/5Per-task delay accounting: Sync block I/O delaysfs/buffer.c fs/read_write.c include/linux/delayacct.h +4 more+76 -42 replies
4/5Per-task delay accounting: Swap in delaysinclude/linux/delayacct.h include/linux/sched.h mm/memory.c+14 -70 replies
5/5Per-task delay accounting: procfs interfacefs/proc/base.c include/linux/delayacct.h kernel/delayacct.c+104 -00 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/5] Per-task delay accounting

The following patches add accounting for the delays seen by a task in
a) waiting for a CPU (while being runnable)
b) completion of synchronous block I/O initiated by the task
c) swapping in pages (i.e. capacity misses).

Such delays provide feedback for a task's cpu priority, io priority and rss limit values. Long delays, especially relative to other tasks, can be a trigger for changing a task's cpu/io priorities and modifying its rss usage (either directly through sys_getprlimit() that was proposed earlier on lkml or by throttling cpu consumption or process calling sys_setrlimit etc.)

There are quite a few differences from the earlier posting of these patches
(http://www.uwsg.indiana.edu/hypermail/linux/kernel/0511.1/2275.html):

- block I/O is (hopefully) being accounted properly now instead of just counting the time spent in io_schedule() as done earlier.

- instead of accounting for time spent in all page faults, only swapping in of pages is being counted since thats the only part that one can really control (capacity misses vs. compulsory misses)

- a /proc interface is being used instead of connector-based interface. Andrew Morton suggested a generic connector-based interface useful for future usage of connectors fo stats. This revised connector-based interface will be posted separately since its useful for efficient delivery of any per-task statistics, not just the ones being introduced by these patches.

- the timestamping code has been made generic (following the suggestions to Matt Helsley's patches to add timestamps to process events connectors)

More comments in individual patches.

Series

nstimestamp-diff.patch
delayacct-init.patch
delayacct-blkio.patch
delayacct-swapin.patch
delayacct-procfs.patch