LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-04-2007, 03:24 PM   #1
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Rep: Reputation: 15
How to make "make" use all cpus?


Hi,
This is probably not the right forum for this question but I use Slackware and prefer to ask other slackers when in trouble.

I have a laptop with Turion 64 x2 cpu. I am trying to compile a suitable kernel for it using the 2.6.21.5 that comes with Slackware12. So I compiled it a couple of times and noticed that during the compile only one of the cpus was used.

A friend told me I can run "make" with an option to use both cpus simultaneously but I couldn't find how. I googled it but may be with wrong keywords....

Since I plan to work on that kernel for a while I am quite interested in making the compilation faster.

Thanks in advance.
 
Old 09-04-2007, 03:57 PM   #2
jnsg
Member
 
Registered: Jan 2005
Location: Kentucky, USA
Distribution: Slackware 13
Posts: 125

Rep: Reputation: 15
Check this out (summary: use the -j option).
 
Old 09-04-2007, 04:24 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
I was about to say a simple "man make" would have provided the answer, but I guess that's only true if you already have an idea what you're looking for.
I usually set jobs to one more than the number of (effective) CPUs. On my old hyperthreaded (PIII) Xeon quad (i.e. -j 9) kernel compiles fly.
 
Old 09-04-2007, 05:15 PM   #4
clw54
LQ Newbie
 
Registered: Dec 2005
Location: San Diego
Distribution: Slackware
Posts: 28

Rep: Reputation: 6
I have a Core 2 Quad and make uses all four without any parameters.
 
Old 09-04-2007, 05:30 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
For dual core or dual processers use -j4. Use -j2 on a single to get a bit better performance.

Brian
 
Old 09-04-2007, 10:26 PM   #6
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Quote:
Originally Posted by kairen View Post
Hi,
This is probably not the right forum for this question but I use Slackware and prefer to ask other slackers when in trouble.

I have a laptop with Turion 64 x2 cpu. I am trying to compile a suitable kernel for it using the 2.6.21.5 that comes with Slackware12. So I compiled it a couple of times and noticed that during the compile only one of the cpus was used.

A friend told me I can run "make" with an option to use both cpus simultaneously but I couldn't find how. I googled it but may be with wrong keywords....

Since I plan to work on that kernel for a while I am quite interested in making the compilation faster.

Thanks in advance.
When you say your compiling for 2.6.21.5 is it just 2.6.21.5 or is it really 2.6.21.5-smp ?

It doesn't matter as much if your just getting one cpu to compile your kernel as much as are you compiling your kernel to use both available cpu's ?

Take a look at my signature for the best instructions I've seen on the net on how to compile a Slackware 12 2.6.21.5-smp kernel (including the -j2 option)

cheers

- perry
 
Old 09-05-2007, 05:59 AM   #7
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
I looked at the man page before posting and somehow missed the -j option .

The kernel is "smp" and I can see Slack uses both cores.

Thanks for the help. I will try this and post the result back here.
 
Old 09-07-2007, 09:50 AM   #8
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Hi,
The "-j" think worked fine. Thanks!!

Now I am trying to compile the "-smp" kernel with ACPI support but the kernel don't boot. If I remove ACPI it works fine but I miss battery support.
At first I want to compile a custom kernel because the default hugesmp.s don't boot - it hangs after initializing the second cpu.
huge.s boots fine but as it is no smp kernel it's of little use.

Funny thing is I can boot with 64-bit kernel 2.6.21.3-smp from slamd which has ACPI compiled in. Same with 32-bit 2.6.13.17-smp from Slackware 11. I am not quite experienced with kernel stuff but I thing there is another thing I have to enable besides ACPI to make it work.

As I said I have a Turion 64 x2 1.8GHz processor on DELL INSPIRON 1501 laptop.

I tried to "kompare" .config files from the 3 kernels but may be they are too different (or I am too ignorant)- it didn't help at all.

Thanks for the help
 
Old 09-07-2007, 09:57 AM   #9
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Thumbs up

Quote:
Originally Posted by kairen View Post
Hi,
The "-j" think worked fine. Thanks!!

Now I am trying to compile the "-smp" kernel with ACPI support but the kernel don't boot. If I remove ACPI it works fine but I miss battery support.
At first I want to compile a custom kernel because the default hugesmp.s don't boot - it hangs after initializing the second cpu.
huge.s boots fine but as it is no smp kernel it's of little use.

Funny thing is I can boot with 64-bit kernel 2.6.21.3-smp from slamd which has ACPI compiled in. Same with 32-bit 2.6.13.17-smp from Slackware 11. I am not quite experienced with kernel stuff but I thing there is another thing I have to enable besides ACPI to make it work.

As I said I have a Turion 64 x2 1.8GHz processor on DELL INSPIRON 1501 laptop.

I tried to "kompare" .config files from the 3 kernels but may be they are too different (or I am too ignorant)- it didn't help at all.

Thanks for the help
Do you have Dropline installed? I think you'll like more than just a KDE option on your system.

Further, try configuring with "make gconfig" as KDE's kernel configuration utility might have glitches.

Also, have you specified your processor type for your kernel configuration? And be aware that "apm" is an alternative to acpi.
Quote:
If the desktop computer is powered by an ATX power supply unit that
reboots and shuts down the computer through software, you can enable APM
in Slack. Start the service, and uncomment apm in rc.modules to have it
auto-start on next boot:

modprobe apm
vi /etc/rc.d/rc.modules

/sbin/modprobe apm
- perry
 
Old 09-07-2007, 10:53 AM   #10
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
In the past I had really bad times trying to install and especially uninstall Dropline gnome so I don't want to try it now.

I specified the cpu as Optheron/K8 but I am not sure that is correct.

As I know boxes with more then one cpu can't use APM for some reason. I read this somewhere during the xconfig - the notes about ACPI and APM I think.Is that correct?
 
Old 09-07-2007, 11:41 AM   #11
Spinlock
Member
 
Registered: Jan 2006
Location: Missouri
Distribution: Slackware -current, Slackware64 -current, Slackware 12.2
Posts: 191

Rep: Reputation: 49
What would make you think that KDE's kernel config has glitches? I have had zero problems out of it... I don't really see how that's relevant.

kairen- What do you mean by your ACPI kernel "won't boot?" Does it hang at a certain spot, or never get past the loading screen? I would suspect that something else is to blame if other ACPI-configured kernels work fine.

Also, a little bit of Googling revealed this. Apparently your model of laptop had a kernel bug as of last December. I don't know if it makes any difference at all anymore, but it may be something to look into.
 
Old 09-07-2007, 12:11 PM   #12
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Quote:
Originally Posted by kairen View Post
In the past I had really bad times trying to install and especially uninstall Dropline gnome so I don't want to try it now.

I specified the cpu as Optheron/K8 but I am not sure that is correct.

As I know boxes with more then one cpu can't use APM for some reason. I read this somewhere during the xconfig - the notes about ACPI and APM I think.Is that correct?
thanks "kinda" important...!

break out your owner's manual, find out what you got cookin underneath the keyboard...!

Are you sure you don't have this problem!
(check your Starboard Bow)

- perry

Last edited by perry; 09-07-2007 at 12:14 PM.
 
Old 09-07-2007, 02:15 PM   #13
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
The last few lines are

NET: Registered protocol family 2
Time: acpi_pm clocksource has been installed.
Switched to high resolution mode on CPU 0
Switched to high resolution mode on CPU 1

I don't know what that meens. I compiled 1 kernel without ACPI - it works fine . Then I recompiled it just switching ACPI on - that is the result.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
get this error when runnign make ***** "no rule to make target 'config'. stop" procfs Linux - General 4 05-12-2013 10:25 AM
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
window maker "make" / "make install" problem xiekke Fedora 2 08-08-2007 10:55 AM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM
compiling tar.bz2... "./configure make make install" doesn't work dodo1983 Linux - Newbie 7 08-17-2004 12:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration