summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 23:18:56 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 23:18:56 -0700
commit9b8696f2a9f201f1a71eb0c53e8239846a2ebd67 (patch)
treeda984de8f298fcb1c8b897497e6971b77e4f4da0 /fs/proc/array.c
parent95f238eac82907c4ccbc301cd5788e67db0715ce (diff)
[PATCH] procfs LoadAVG/load_avg scaling fix
From: Ingo Molnar <mingo@elte.hu> Dave reported that /proc/*/status sometimes shows 101% as LoadAVG, which makes no sense. the reason of the bug is slightly incorrect scaling of the load_avg value. The patch below fixes this.
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index ae90151e45ae..40d29f078984 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -162,7 +162,7 @@ static inline char * task_state(struct task_struct *p, char *buffer)
"Uid:\t%d\t%d\t%d\t%d\n"
"Gid:\t%d\t%d\t%d\t%d\n",
get_task_state(p),
- (p->sleep_avg/1024)*100/(1000000000/1024),
+ (p->sleep_avg/1024)*100/(1020000000/1024),
p->tgid,
p->pid, p->pid ? p->real_parent->pid : 0,
p->pid && p->ptrace ? p->parent->pid : 0,