Re: FW: Linux question

From: Bill Davidsen
Date: Fri Mar 07 2008 - 13:39:07 EST


Justin Banks wrote:
Miller, Mike (OS Dev) wrote
Is there a way in to limit the kernel to seeing only the cores on a
single processor and ignore all other processor cores (eg. leave
them in HALT)?

Can't you just echo 0 into /sys/devices/system/cpu/cpuN/online where the
/sys/devices/system/cpu/cpuN/topology/physical_package_id isn't the one
you want to keep online?

Here's an interesting question, why isn't there an "online" file for each CPU?

Example:

posidon:davidsen> l /sys/devices/system/cpu/cpu?
/sys/devices/system/cpu/cpu0:
total 0
drwxr-xr-x 5 root 0 Feb 7 12:57 cache
drwxr-xr-x 3 root 0 Mar 7 13:28 cpufreq
-r-------- 1 root 4096 Mar 7 13:28 crash_notes
drwxr-xr-x 2 root 0 Mar 7 13:28 microcode
drwxr-xr-x 2 root 0 Mar 7 13:28 topology

/sys/devices/system/cpu/cpu1:
total 0
drwxr-xr-x 5 root 0 Feb 7 12:57 cache
drwxr-xr-x 3 root 0 Mar 7 13:28 cpufreq
-r-------- 1 root 4096 Mar 7 13:28 crash_notes
drwxr-xr-x 2 root 0 Mar 7 13:28 microcode
-rw-r--r-- 1 root 4096 Mar 7 13:28 online
drwxr-xr-x 2 root 0 Mar 7 13:28 topology


--
Bill Davidsen <davidsen@xxxxxxx>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/