Re: Module Versioning Problems: How to "probe" for SMP

Jacques Gelinas (jack@solucorp.qc.ca)
Mon, 16 Sep 1996 09:50:23 -0400 (EDT)


On Mon, 16 Sep 1996, Hans Lermen wrote:

> On Mon, 16 Sep 1996, Jacques Gelinas wrote:
>
> > How do I know I am running a SMP kernel. I know I can go in /proc/cpuinfo
> > and count the number of CPU reported there. Yet on my system, there is
> > only one, and I am running a SMP kernel, so I need to load SMP
> > aware modules. For example, one may have disable one cpu (using the BIOS)
> > and reboot his system with the only kernel he has (A smp one).
> >
> > I was looking for some simple way to probe the information available in
> > /proc maybe. It there any ? Should we add one ? This would reduce the
> > confusion.
>
> A simple one is
>
> cat /proc/cpuinfo | grep 'processor.:.1'

Except that if you boot on a non-SMP (or a SMP machine with only one
processor active), this test won't work.

> or
>
> cat /proc/ksyms | grep cpu_data

This works I guess, but this is a ack. We really need something like

/proc/smp

or a special line at the begining of cpuinfo
or the word SMP written in plain in /proc/version.


--------------------------------------------------------
Jacques Gelinas (jacques@solucorp.qc.ca)
Linuxconf: The ultimate administration system for Linux.
see http://www.solucorp.qc.ca:/linuxconf