Prev: Distro suggestion
Next: In praise of Windows
From: fazlin on 14 Nov 2008 08:14 On Nov 14, 5:27 am, Big and Blue <N...(a)dsl.pipex.com> wrote: > fazlin wrote: > > Hello All, > > > Is there any kernel APIs or variable to find out the number of CPUs in > > a system. From user space, i can use /proc/cpuinfo file but is there a > > way to do it from kernel. > > "From the kernel". Are you writing a kernel module? If not then > /proc/cpuinfo *is* the kernel interface. > > -- > Just because I've written it doesn't mean that > either you or I have to believe it.. Yes. I need this info in a kernel module. I cannot use /proc interface. - Fazlin
From: Geoffrey Clements on 14 Nov 2008 09:10 "fazlin" <fazlincse(a)gmail.com> wrote in message news:57481aed-dff1-4e8f-b9c2-49aaeaff2474(a)i20g2000prf.googlegroups.com... On Nov 14, 5:27 am, Big and Blue <N...(a)dsl.pipex.com> wrote: > fazlin wrote: > > Hello All, > > > Is there any kernel APIs or variable to find out the number of CPUs in > > a system. From user space, i can use /proc/cpuinfo file but is there a > > way to do it from kernel. > > "From the kernel". Are you writing a kernel module? If not then > /proc/cpuinfo *is* the kernel interface. > > -- > Just because I've written it doesn't mean that > either you or I have to believe it. > >Yes. I need this info in a kernel module. I cannot use /proc >interface. I'm not a kernel dev but I notice there's a header file called topology.h which might be a place to start. -- Geoff
From: Big and Blue on 14 Nov 2008 19:13
fazlin wrote: > > Yes. I need this info in a kernel module. I cannot use /proc > interface. Then find the kernel code that handles /proc/cpuinfo and see what it does. It must be going in a loop to print the info. The number of times it goes through that loop is what you want, so find out how it gets there. -- Just because I've written it doesn't mean that either you or I have to believe it. |