Re: Workaround for wrapping loadaverage

From: Andrew Morton
Date: Mon Nov 08 2004 - 04:38:34 EST

Patrick Mau <mau@xxxxxxxxxxxxx> wrote:
> n a previous message archived at
> I described a problem with a wrapping load average on my SMP system.
> The following small userspace load simulation exactly matches the
> numbers I am seeing.
> We can only account for 1024 runnable processes, since we have 22 bits
> precision, I would like to suggest a patch to calc_load in kernel/timer.c
> that would limit the number of active tasks:
> if (active_tasks > 1024 * FIXED_1)
> active_tasks = 1024 * FIXED_1;

It's better than wrapping to zero...

Why do we need 11 bits after the binary point?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at