Re: SMP version of procps-1.2.8

German Jose Gomez Garcia (mat006@pinon.ccu.uniovi.es)
Wed, 17 Jun 1998 15:34:34 +0200 (METDST)


Woa, you write really too many mail ;), I have just discover your
last three messages, going step by step:

- The header lines was a really fault!, the thing is that first I've
disabled SMP info by default, then I enabled, and so .... things go mad...
the "correct way" to fix it is really simple, just add a

#ifdef __SMP__
header_lines += max_cpu;
#endif

in top.c in get_options() just after

header_lines = 7;

I have this at first, but when I disabled SMP info by default I
just deleted it, and finally when I enabled again SMP info, well, you know,
code fast == bad code.

About make the procps full SMP aware and drop all non SMP info, uhmm,
it sounds great, already I have even done it, but I think people (mainly
procps developers) wouldn't like the idea, I mean, people with UP system
will complain about: what do I need all those arrays for? and blahblahblah...
I think I could make all __SMP__ or not __SMP__, I mean if you define
__SMP__ you get only the __SMP__ version and nothing of that UP stuff,
but thats a thing to think on, personally I prefer the way it's now
(You can enable SMP info on the way, and you can have a total CPU stats
also).
About CURRENT_CPU instead MAIN_CPU, it is already that, I mean
MAIN_CPU = CURRENT_CPU, just a matter of words :), I have already code
another version with CCPU == most used CPU since last step, and MCPU ==
most used CPU since process started, I'll post it tonight (GMT) including
the fix for the header_lines *BUG*.

About the way cpu number is determined, I know it's bad code, but
it's simple, fast and what the hell, everybody has a PID 1 process :)

Nothing else, and thanks for your interest

PS: I'm still expecting mails from people with more than 2 SMP systems :)

<>-------------------------------------+-----------------------------------<>
One O.S. to rule them all, | German Gomez Garcia
One O.S. to find them. | mat006@pinon.ccu.uniovi.es
One O.S. to bring them all |
and in the darkness bind them. | "Wur Qanar Wur Stilor Wur Kas"
<>-------------------------------------+-----------------------------------<>

On Wed, 17 Jun 1998 nicholas@binary9.net wrote:

> Hey! It's me again. Sorry to bother you, but I was thinking about
> something.*
>
> Instead of having a SMP version of procps, why not just make the entire
> thing aware? First part is to construct a UP safe way of detecting cpu's.
> This I just did: (~procps/proc/libproc) (its dependant on the format of
> /proc/cpuinfo unfortunately).
.....
> Well, good luck and keep me posted! :)
>
> * my infatuation with this project is that I just got my first SMP system
> and I'm exploring it :)
>
> -----------------------------------------------------------------------------
> Nicholas J. Leon "Elegance Through Simplicity"
> nicholas@binary9.net - - http://mrnick.binary9.net
>
> 8 4 1 9 7 3 <-- what is the pattern?
>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu