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

Jacques Gelinas (jack@solucorp.qc.ca)
Mon, 16 Sep 1996 01:21:36 -0400 (EDT)


I have completed the modification to get module versionning differently
for SMP and non SMP (2-3 files to modify). I will send a patch to this
list later.

In my earlier message, I was suggesting that modules for non-SMP goes in

/lib/modules/2.0.xx/

while, modules for SMP go in

/lib/modules/2.0.xx-smp

or something like this. This would be handy for developpers and for people
who have SMP related hardware problems (remember the TYAN thread :-) ) and
want to switch back and forth between two types of kernel.

So now, I am running a 2.0.20 smp kernel on my non SMP Pentium machine. As
expected, it works. My problem is simple

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.

Thanks!

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