
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.


---

 25-akpm/fs/proc/array.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/proc/array.c~proc-load-average-fix fs/proc/array.c
--- 25/fs/proc/array.c~proc-load-average-fix	2004-04-04 16:39:30.493667008 -0700
+++ 25-akpm/fs/proc/array.c	2004-04-04 16:39:30.497666400 -0700
@@ -162,7 +162,7 @@ static inline char * task_state(struct t
 		"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,

_
