LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-17-2008, 08:18 PM   #1
bromanescu
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
SMP system - use a single CPU during boot


I have an SMP system with 4 Pentium-4(i386) CPUs. I would like to restrict the kernel (2.6.15 Fedora Core) to use a single CPU during boot, but have the possibility to start using the other CPUs at a later time.

Using 'maxcpus=1' as a kernel option forces the boot on a single CPU, but totally disables the other cores (I can't use them anymore). I tried using the 'maxcpus' with the CPU hotplug, but once I have booted, I do not have the option to online the other cores.

Any advice would be extremely helpful. Thanks,

Bogdan

Last edited by bromanescu; 10-17-2008 at 08:43 PM.
 
Old 10-17-2008, 10:09 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Here's an excellent description of the boot process ... and why what you're asking for is nonsense:

http://duartes.org/gustavo/blog/post...l-boot-process
 
Old 10-17-2008, 10:55 PM   #3
bromanescu
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by paulsm4 View Post
Hi -

Here's an excellent description of the boot process ... and why what you're asking for is nonsense:

http://duartes.org/gustavo/blog/post...l-boot-process
Thanks for the link. However, it is unclear how the link you've provided renders my question useless. My issue is not that all the processors in the system are initialized (just a parenthesis, I'd be interested if there is a way to delay the initialization of certain processors; I'd think this is doable as there are NUMA systems that allow for hotplug CPUs), but that afterward, the kernel starts scheduling threads on all of them.

I'd like to either
  • restrict this scheduling of kernel threads to a single core (but be able to run user threads latter on all cores) OR
  • restrict the scheduling of any type of thread to a single core until I online the others

Thanks.
 
Old 10-18-2008, 12:50 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

The point I was trying to make was that:

a) Linux multiprocessing (like Windows, and *unlike* some other platforms), is a "Symmetric" multiprocessing model

b) Considerable work needs to be done before the processors can be brought on-line into multi-user mode (heck - considerable work needs to be done long before that, just bringing the x86 processor from real mode into protected mode)

c) In Linux, the last practical opportunity to do all this preparation - and also insure that all the CPUs are in synch with each other, and with the system as a whole - is just *before* the system starts the "init" process.

Perhaps another option might be "Processor Affinity":

http://www.ibm.com/developerworks/li...-affinity.html


IMHO .. PSM

PS:
I haven't tried this, but it also might help:
http://www.mjmwired.net/kernel/Docum...pu-hotplug.txt

Last edited by paulsm4; 10-18-2008 at 12:55 PM.
 
Old 10-18-2008, 04:29 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 10,467

Rep: Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627
And if you don't want to go playing with the processors themselves, have a look at cgroups.txt. For CPU isolation this works a treat - I have used its predecessor (cpusets) for ages to isolate my testing. That way I can log in using another CPU and monitor it successfully - and if/when it all goes to hell, I can still get in and kill it ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMP system :how to know which CPU a process belong to ? hhshr825 Linux - Newbie 4 01-11-2008 02:04 AM
Unorthodox Multi-boot on Multiflavor System on single sata hdd neoezekiel Linux - Software 2 12-03-2006 09:28 PM
Do you still need grub if you have a single boot system? LinuxPadawan Linux - General 4 04-14-2005 03:39 PM
Single FTP directory on a dual boot system? JimBass Linux - Newbie 8 03-18-2004 08:09 PM
single boot system alb1954 Linux - Newbie 7 02-25-2003 09:11 PM


All times are GMT -5. The time now is 05:24 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration