CHROMIUM: sched: update the average of nr_running
authorJoseph Lo <josephl@nvidia.com>
Mon, 22 Apr 2013 06:39:18 +0000 (14:39 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Wed, 10 Aug 2016 22:01:22 +0000 (15:01 -0700)
commit3a400abdc57e047786d0b35d39617a794e2bb97e
treecec02b562a3a17e89ff6e2d1f6b75dbbc7462e17
parentfed95d9ef1b2674c4a2cda8b2445ca7ef3f6ca59
CHROMIUM: sched: update the average of nr_running

Doing a Exponential moving average per nr_running++/-- does not
guarantee a fixed sample rate which induces errors if there are lots of
threads being enqueued/dequeued from the rq (Linpack mt). Instead of
keeping track of the avg, the scheduler now keeps track of the integral
of nr_running and allows the readers to perform filtering on top.

Original-author: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>

Change-Id: Id946654f32fa8be0eaf9d8fa7c9a8039b5ef9fab
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174694
Reviewed-on: https://chromium-review.googlesource.com/272853
[jstultz: fwdported to 4.4]
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/sched.h
kernel/sched/core.c
kernel/sched/sched.h