Files
linux/include/linux
Dietmar Eggemann 48d818f6e3 sched/fair: Add eas (& cas) specific rq, sd and task stats
The statistic counter are placed in the eas (& cas) wakeup path. Each
of them has one representation for the runqueue (rq), the sched_domain
(sd) and the task.
A task counter is always incremented. A rq counter is always
incremented for the rq the scheduler is currently running on. A sd
counter is only incremented if a relation to a sd exists.

The counters are exposed:

(1) In /proc/schedstat for rq's and sd's:

$ cat /proc/schedstat
...
cpu0 71422 0 2321254 ...
eas  44144 0 0 19446 0 24698 568435 51621 156932 133 222011 17459 120279 516814 83 0 156962 359235 176439 139981
  <- runqueue for cpu0
...
domain0 3 42430 42331 ...
eas 0 0 0 14200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 66355 0  <- MC sched domain for cpu0
...

The per-cpu eas vector has the following elements:

sis_attempts  sis_idle   sis_cache_affine sis_suff_cap    sis_idle_cpu    sis_count               ||
secb_attempts secb_sync  secb_idle_bt     secb_insuff_cap secb_no_nrg_sav secb_nrg_sav secb_count ||
fbt_attempts  fbt_no_cpu fbt_no_sd        fbt_pref_idle   fbt_count                               ||
cas_attempts  cas_count

The following relations exist between these counters (from cpu0 eas
vector above):

sis_attempts = sis_idle + sis_cache_affine + sis_suff_cap + sis_idle_cpu + sis_count

44144        = 0        + 0                + 19446        + 0            + 24698

secb_attempts = secb_sync + secb_idle_bt + secb_insuff_cap + secb_no_nrg_sav + secb_nrg_sav + secb_count

568435        = 51621     + 156932       + 133             + 222011          + 17459        + 120279

fbt_attempts = fbt_no_cpu + fbt_no_sd + fbt_pref_idle + fbt_count + (return -1)

516814       = 83         + 0         + 156962        + 359235    + (534)

cas_attempts = cas_count + (return -1 or smp_processor_id())

176439       = 139981    + (36458)

(2) In /proc/$PROCESS_PID/task/$TASK_PID/sched for a task.

example: main thread of system_server

$ cat /proc/1083/task/1083/sched

...
se.statistics.nr_wakeups_sis_attempts        :                  945
se.statistics.nr_wakeups_sis_idle            :                    0
se.statistics.nr_wakeups_sis_cache_affine    :                    0
se.statistics.nr_wakeups_sis_suff_cap        :                  219
se.statistics.nr_wakeups_sis_idle_cpu        :                    0
se.statistics.nr_wakeups_sis_count           :                  726
se.statistics.nr_wakeups_secb_attempts       :                10376
se.statistics.nr_wakeups_secb_sync           :                 1462
se.statistics.nr_wakeups_secb_idle_bt        :                 6984
se.statistics.nr_wakeups_secb_insuff_cap     :                    3
se.statistics.nr_wakeups_secb_no_nrg_sav     :                  927
se.statistics.nr_wakeups_secb_nrg_sav        :                  206
se.statistics.nr_wakeups_secb_count          :                  794
se.statistics.nr_wakeups_fbt_attempts        :                 8914
se.statistics.nr_wakeups_fbt_no_cpu          :                    0
se.statistics.nr_wakeups_fbt_no_sd           :                    0
se.statistics.nr_wakeups_fbt_pref_idle       :                 6987
se.statistics.nr_wakeups_fbt_count           :                 1554
se.statistics.nr_wakeups_cas_attempts        :                 3107
se.statistics.nr_wakeups_cas_count           :                 1195
...

The same relation between the counters as in the per-cpu case apply.

Change-Id: Ie7d01267c78a3f41f60a3ef52917d5a5d463f195
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2017-06-21 16:37:38 +05:30
..
2015-10-01 12:48:11 -07:00
2015-06-25 11:49:31 +03:00
2015-10-17 21:22:08 -07:00
2015-10-07 18:08:15 +01:00
2015-08-27 20:47:09 +01:00
2016-08-20 18:09:25 +02:00
2015-05-13 12:04:55 -05:00
2015-03-25 20:28:11 -04:00
2016-03-09 15:34:52 -08:00
2015-11-07 10:40:47 -07:00
2015-02-12 18:54:15 -08:00
2015-09-08 15:35:28 -07:00
2015-10-18 10:14:39 -07:00
2015-01-21 19:21:30 +01:00
2014-11-10 09:27:30 -07:00
2017-05-14 13:32:59 +02:00
2014-12-31 13:06:50 -05:00
2014-10-09 11:35:48 +03:00
2015-06-24 17:49:45 -07:00
2014-10-08 16:01:41 -04:00
2014-08-06 18:01:24 -07:00
2016-02-16 13:50:55 -08:00
2015-05-12 10:46:53 +02:00
2015-09-08 15:35:28 -07:00
2015-03-16 21:45:54 +11:00
2015-05-05 13:40:42 -06:00
2014-06-06 16:08:13 -07:00
2016-04-20 15:42:02 +09:00
2015-10-23 05:44:28 -07:00
2014-06-02 14:56:01 -07:00
2015-08-27 19:40:58 -04:00
2015-10-01 15:06:43 +02:00
2015-10-13 19:01:25 +02:00
2015-06-25 12:06:45 +02:00
2014-03-13 12:11:00 +10:30
2016-10-28 03:01:30 -04:00
2015-08-18 15:49:15 -07:00
2015-07-28 08:50:42 +01:00
2015-04-29 17:17:17 -05:00
2015-11-23 09:44:58 +01:00
2014-05-27 17:38:11 -07:00
2015-04-14 16:49:05 -07:00
2015-10-27 18:55:31 -07:00
2015-06-24 17:49:41 -07:00
2015-10-20 22:10:45 +08:00
2015-07-21 10:39:05 -07:00
2014-03-04 13:51:06 -05:00
2015-06-25 04:20:04 -04:00
2016-03-03 15:07:28 -08:00
2015-03-11 17:56:28 -04:00
2014-11-04 13:29:38 +00:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-11-06 17:50:42 -08:00
2016-12-08 07:15:24 +01:00
2014-07-09 14:58:37 +01:00
2015-04-12 21:03:31 +02:00
2015-01-25 23:17:28 -05:00
2016-04-08 11:24:28 +08:00
2015-10-09 17:00:32 -04:00
2015-10-06 17:08:19 +02:00
2015-05-26 15:23:23 +02:00
2015-06-25 01:13:43 +02:00
2014-08-08 15:57:26 -07:00
2016-08-27 11:23:38 +08:00
2016-09-24 11:33:19 +08:00
2016-09-30 10:18:37 +02:00
2014-06-12 00:21:11 -04:00
2016-10-28 03:01:30 -04:00
2014-06-04 16:53:57 -07:00
2015-06-25 17:00:39 -07:00
2016-04-12 09:08:35 -07:00
2015-08-17 11:25:28 -07:00
2015-10-01 09:57:59 -07:00
2015-10-19 01:01:21 +02:00
2016-06-01 12:15:52 -07:00
2015-11-23 09:44:58 +01:00
2014-11-28 16:08:16 +01:00
2015-12-04 08:38:42 -07:00
2014-04-07 16:35:53 -07:00
2015-12-13 14:30:59 -08:00
2015-03-24 09:48:14 -07:00
2015-11-13 20:34:33 -05:00
2015-09-08 15:35:28 -07:00