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
34 */34 */
35 35
36 36
37#define TASKSTATS_VERSION 1037#define TASKSTATS_VERSION 11
38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
39 * in linux/sched.h */39 * in linux/sched.h */
40 40
@@ -172,6 +172,10 @@ struct taskstats { · 131 unmodified lines
172 172
173 /* v10: 64-bit btime to avoid overflow */173 /* v10: 64-bit btime to avoid overflow */
174 __u64 ac_btime64; /* 64-bit begin time */174 __u64 ac_btime64; /* 64-bit begin time */
175
176 /* Delay waiting for memory compact */
177 __u64 compact_count;
178 __u64 compact_delay_total;
175};179};
176 180
177 181