lkml.org 
[lkml]   [2008]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] x86: modify show_shared_cpu_map in intel_cacheinfo v3
On Tue, Apr 8, 2008 at 10:44 PM, Mike Travis <travis@sgi.com> wrote:
> Btw, you were asking about how to determine NR_CPUS. Here's one way:
>
> root@newton:~# cat /sys/devices/system/cpu/online
> 0-2,4-7
> root@newton:~# cat /sys/devices/system/cpu/possible
> 0-511
> root@newton:~# cat /sys/devices/system/cpu/present
> 0-7
> root@newton:~# cat /sys/devices/system/cpu/system
> 0-4095
I think its easier to count the commas from a cpumask file. Here you
must parse a complete list expression, just to get the max id.

Either way, I think this isn't a very clean way.

Bert
> Thanks,
> Mike
>


\
 
 \ /
  Last update: 2008-04-10 19:27    [W:0.077 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site