diff options
author | Paul Turner <[email protected]> | 2012-10-04 13:18:29 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2012-10-24 10:27:18 +0200 |
commit | 9d85f21c94f7f7a84d0ba686c58aa6d9da58fdbb (patch) | |
tree | bec53516fbe39007b12250423b7a09e7b62184c3 /lib/string_helpers.c | |
parent | 0e9e3e306c7e472bdcffa34c4c4584301eda03b3 (diff) |
sched: Track the runnable average on a per-task entity basis
Instead of tracking averaging the load parented by a cfs_rq, we can track
entity load directly. With the load for a given cfs_rq then being the sum
of its children.
To do this we represent the historical contribution to runnable average
within each trailing 1024us of execution as the coefficients of a
geometric series.
We can express this for a given task t as:
runnable_sum(t) = \Sum u_i * y^i, runnable_avg_period(t) = \Sum 1024 * y^i
load(t) = weight_t * runnable_sum(t) / runnable_avg_period(t)
Where: u_i is the usage in the last i`th 1024us period (approximately 1ms)
~ms and y is chosen such that y^k = 1/2. We currently choose k to be 32 which
roughly translates to about a sched period.
Signed-off-by: Paul Turner <[email protected]>
Reviewed-by: Ben Segall <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions