History

delayacct: track delays from memory compact

Delay accounting does not track the delay of memory compact. When there is not enough free memory, tasks can spend a amount of their time waiting for compact. To get the impact of tasks in direct memory compact, measure the delay when allocating memory through memory compact. Also update tools/accounting/getdelays.c: / # ./getdelays_next -di -p 304 print delayacct stats ON printing IO accounting PID 304 CPU count real total virtual total delay total delay average 277 780000000 849039485 18877296 0.068ms IO count delay total delay average 0 0 0ms SWAP count delay total delay average 0 0 0ms RECLAIM count delay total delay average 5 11088812685 2217ms THRASHING count delay total delay average 0 0 0ms COMPACT count delay total delay average 3 72758 0ms watch: read=0, write=0, cancelled_write=0

wangyong committed 4 years ago

Commit 5bf18281 parent ec710aa5 files · +59 −2Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/taskstats.h+5−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434 */
3535
3636
37−#define TASKSTATS_VERSION 10
37+#define TASKSTATS_VERSION 11
3838 #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
3939 * in linux/sched.h */
4040
@@ -172,6 +172,10 @@ struct taskstats { · 131 unmodified lines
172172
173173 /* v10: 64-bit btime to avoid overflow */
174174 __u64 ac_btime64; /* 64-bit begin time */
175+
176+ /* Delay waiting for memory compact */
177+ __u64 compact_count;
178+ __u64 compact_delay_total;
175179 };
176180
177181