Re: /proc/penguin addition

Andi Kleen (andi@mind.aec.at)
10 Jul 1997 23:18:50 +0200


psj@cgmlarson.com (Patrick St. Jean) writes:

> Here's a patch to 2.1.43 that adds an entry in /proc named penguin. It
> returns sort of an uptime like rating. Anything less than a day rates a
> "penguin", 1 to 10 days are kilopenguins, 10 to 100 are megapenguins, 100
> to 1000 are gigapenguins, and 1000 to 10000 are terapenguins. If you
> think that you can keep a machine up for more than 27 years, I'll put in
> more... A patch for the 2.0 series will arrive shortly
[....]
> + {
> + float penguins = 0;
^^^^^^^^^^^^^^^^^^^
I think you can't use Floating point in kernel code because the FPU
context is not saved there. You'll probably mess with the user process
FPU context. Better use fixed point arithmetic with integers.

-Andi