LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* FW: Linux question
@ 2008-03-06 19:33 Miller, Mike (OS Dev)
  2008-03-06 19:51 ` Cyrill Gorcunov
  2008-03-06 20:38 ` Justin Banks
  0 siblings, 2 replies; 7+ messages in thread
From: Miller, Mike (OS Dev) @ 2008-03-06 19:33 UTC (permalink / raw)
  To: linux-kernel

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)?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-06 19:33 FW: Linux question Miller, Mike (OS Dev)
@ 2008-03-06 19:51 ` Cyrill Gorcunov
  2008-03-06 20:38 ` Justin Banks
  1 sibling, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-03-06 19:51 UTC (permalink / raw)
  To: Miller, Mike (OS Dev); +Cc: linux-kernel, Andi Kleen

[Miller, Mike (OS Dev) - Thu, Mar 06, 2008 at 07:33:09PM +0000]
| 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)?
| --

You may try to play with "nosmp" boot parameter, but i'm not sure
that is exactly you wanted.

		- Cyrill -

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-06 19:33 FW: Linux question Miller, Mike (OS Dev)
  2008-03-06 19:51 ` Cyrill Gorcunov
@ 2008-03-06 20:38 ` Justin Banks
  2008-03-07 18:43   ` Bill Davidsen
  1 sibling, 1 reply; 7+ messages in thread
From: Justin Banks @ 2008-03-06 20:38 UTC (permalink / raw)
  To: Miller, Mike (OS Dev); +Cc: linux-kernel

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?

-justinb

-- 
Justin Banks
BakBone Software
justinb@bakbone.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-06 20:38 ` Justin Banks
@ 2008-03-07 18:43   ` Bill Davidsen
  2008-03-07 19:13     ` Justin Banks
  2008-03-07 19:14     ` Andi Kleen
  0 siblings, 2 replies; 7+ messages in thread
From: Bill Davidsen @ 2008-03-07 18:43 UTC (permalink / raw)
  To: Justin Banks; +Cc: Miller, Mike (OS Dev), linux-kernel

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@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-07 18:43   ` Bill Davidsen
@ 2008-03-07 19:13     ` Justin Banks
  2008-03-07 19:14     ` Andi Kleen
  1 sibling, 0 replies; 7+ messages in thread
From: Justin Banks @ 2008-03-07 19:13 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Justin Banks, Miller, Mike (OS Dev), linux-kernel

Bill Davidsen wrote
> 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?

I've noticed that as well, and I'm not sure. IIRC, on some systems I've
seen there's an online file for every CPU, but on my laptop (2.6.22
Intel Mac) there isn't one for cpu0, just as in your example.

-justinb

-- 
Justin Banks
BakBone Software
justinb@bakbone.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-07 18:43   ` Bill Davidsen
  2008-03-07 19:13     ` Justin Banks
@ 2008-03-07 19:14     ` Andi Kleen
  2008-03-08 17:07       ` Bill Davidsen
  1 sibling, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2008-03-07 19:14 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Justin Banks, Miller, Mike (OS Dev), linux-kernel

Bill Davidsen <davidsen@tmr.com> writes:

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

There are still some problems with off lining CPU #0 on x86 at least,
that is why it is not allowed. iirc they weren't very difficult so it
would be probably fixable with some effort.

-Andi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FW: Linux question
  2008-03-07 19:14     ` Andi Kleen
@ 2008-03-08 17:07       ` Bill Davidsen
  0 siblings, 0 replies; 7+ messages in thread
From: Bill Davidsen @ 2008-03-08 17:07 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Justin Banks, Miller, Mike (OS Dev), linux-kernel

Andi Kleen wrote:
> Bill Davidsen <davidsen@tmr.com> writes:
>
>   
>> Here's an interesting question, why isn't there an "online" file for
>> each CPU?
>>     
>
> There are still some problems with off lining CPU #0 on x86 at least,
> that is why it is not allowed. iirc they weren't very difficult so it
> would be probably fixable with some effort.
>   

If that's the case I would think that making it read-only would be a 
better solution, since I found this while creating a little tool to scan 
and see what's online and what's not. Obviously there can be exception 
cases for CPU0 and x86, but I would think that having the CPU0 for x86 
be read-only would be a quirk, and handled in the kernel.

-- 
Bill Davidsen <davidsen@tmr.com>
  "Woe unto the statesman who makes war without a reason that will still
  be valid when the war is over..." Otto von Bismark 



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-08 17:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 19:33 FW: Linux question Miller, Mike (OS Dev)
2008-03-06 19:51 ` Cyrill Gorcunov
2008-03-06 20:38 ` Justin Banks
2008-03-07 18:43   ` Bill Davidsen
2008-03-07 19:13     ` Justin Banks
2008-03-07 19:14     ` Andi Kleen
2008-03-08 17:07       ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).