Re: O(1) count_active_tasks()

Robert Love (rml@tech9.net)
28 May 2002 11:08:35 -0700


On Tue, 2002-05-28 at 08:33, Robert Love wrote:

> If I get a chance, I'll run some tests on my dual 2.5 machine and see if
> they match. But I would not let that stop anything ... this is mergable
> in 2.5 imo.

Well, I did some tests. I changed count_active_tasks to calculate using
both methods and whine if they did not match. I then put the machine
under extreme load with a lot of I/O. Finally, I ran `uptime(1)' in a
tight loop and watched the console.

Over a long period of constant count_active_tasks calls via `uptime(1)',
I had only a couple messages. This is most likely <=1% of the calls and
in each case we were one to high with the new method (140 vs 141, for
example).

Not sure why, or if it is even us or nr_running() or even the old method
that is off ... but who cares. It is a statistic.

Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/