lkml.org 
[lkml]   [1996]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module Versioning Problems: How to "probe" for SMP
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'

or

cat /proc/ksyms | grep cpu_data

However, it also should be good to have 'smp_num_cpus' accessible from
within the module (also on non-SMP kernels). This would allow generic
solutions. ( it's a bit tricky to read /proc from within the module )

It also would be great if we have a kernel parameter to force an SMP-kernel
to use only one CPU (e.g. smpboot=no). This would not need to change
the BIOS's setup.

So long,
Hans
<lermen@fgan.de>


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.100 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site