From 0b5a8a6f30fe0eb7919294c58ddedaeab069ce2a Mon Sep 17 00:00:00 2001 From: Diwakar Tundlam Date: Mon, 7 May 2012 15:12:25 -0700 Subject: scheduler: compute time-average nr_running per run-queue Compute the time-average number of running tasks per run-queue for a trailing window of a fixed time period. The detla add/sub to the average value is weighted by the amount of time per nr_running value relative to the total measurement period. Change-Id: I076e24ff4ed65bed3b8dd8d2b279a503318071ff Signed-off-by: Diwakar Tundlam (cherry picked from commit 3a12d7499cee352e8a46eaf700259ba3c733f0e3) Reviewed-on: http://git-master/r/111635 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sai Gurrappadi Tested-by: Sai Gurrappadi Reviewed-by: Peter Boonstoppel Reviewed-by: Yu-Huan Hsu --- include/linux/sched.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/sched.h b/include/linux/sched.h index 5bb4dd2e4c59..c9e03a9aa956 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -139,6 +139,7 @@ extern int nr_processes(void); extern unsigned long nr_running(void); extern unsigned long nr_uninterruptible(void); extern unsigned long nr_iowait(void); +extern unsigned long avg_nr_running(void); extern unsigned long nr_iowait_cpu(int cpu); extern unsigned long this_cpu_load(void); -- cgit v1.2.3