View previous topic :: View next topic |
Author |
Message |
zachula n00b
Joined: 29 Jul 2005 Posts: 19
|
Posted: Fri Aug 12, 2005 12:26 am Post subject: Removing SMP on Ultra10 single proc |
|
|
Trying to tweak things down to the smallest, fastest kernel I can. For some reason I cannot get the kernel to compile correctly without SMP. This is really my first foray into kernel optimization and I have already destroyed one kernel in my noobishness because I overwrote my existing working kernel.....luckilly the skills I learned during installation were used and I chrooted back in and rebuilt my kernel(I was smart enough to back my original working config up)
So now after some searching on the forums but not really finding much I ask, do I have to have SMP in? I don't use it and probably never will on this machine. I have already dumped most of the things that will never touch this box(SCSI support, Firewire, raid controllers and the like) because I figure if I do ever add hardware to this machine(why??) then I will end up recompiling my kernel anyways. This is good practice anyways.
oh and I am running 2.4.29 sparc64 on a 300mhz Sparc IIi Ultra10. Any tips?
Maybe even some general knowledge....like I know the difference between a modularized and a monolithic kernel and I am pretty sure I understand the pros and cons for each one. ie monolithic means all drivers compiled in = faster operation in most cases but less flexible and tolerant of hw changes also typically faster compile times whereas modular kernels are a little slower but much more flexible when it comes to hw support on the fly and they take longer to compile.(if I am wrong please please point out the error in my ways so I may be so enlightened)
oh yeah....do I need to update the system.map file every time I recompile? |
|
Back to top |
|
|
Ferris Retired Dev
Joined: 13 Jan 2003 Posts: 426 Location: N. Virginia (USA)
|
Posted: Fri Aug 12, 2005 11:39 am Post subject: |
|
|
On a U10, you will never use SMP because it is not mulit-processor capable. Off hand, I can't think of any reason why you should have to compile it in; last I knew the live CD distributions had both SMP and single processor kernels on them.
Using modules is a matter of taste. I always build a lot of things as modules, but they tend to be for capabilities that I don't actually ever care about. I don't know of any particular performance issues. (Their greatest use has been to keep the size of the kernel below a magic upper bound, but with current version of SILO, that upper bound is now huge.)
System.map gets rewritten automatically every time you build and install a kernel, whether you like it or not. I usually copy it into the /boot partition along with the kernel and it's .config file, but the system doesn't require it. What you must do is remember to 'make modules_install'.
Regards, |
|
Back to top |
|
|
zachula n00b
Joined: 29 Jul 2005 Posts: 19
|
Posted: Fri Aug 12, 2005 3:44 pm Post subject: |
|
|
My thoughts exactly. I tried it a couple times and it would give some strange error during compile
Code: |
In file included from /usr/src/linux-2.4.29-sparc/include/linux/sched.h:23,
from /usr/src/linux-2.4.29-sparc/include/linux/mm.h:4,
from sys.c:9:
/usr/src/linux-2.4.29-sparc/include/linux/smp.h:80:1: warning: "smp_num_cpus" redefined
In file included from /usr/src/linux-2.4.29-sparc/include/linux/modversions.h:281,
from /usr/src/linux-2.4.29-sparc/include/linux/module.h:22,
from sys.c:8:
/usr/src/linux-2.4.29-sparc/include/linux/modules/sparc64_ksyms.ver:26:1: warning: this is the location of the previous definition
In file included from /usr/src/linux-2.4.29-sparc/include/linux/sched.h:23,
from /usr/src/linux-2.4.29-sparc/include/linux/mm.h:4,
from sys.c:9:
/usr/src/linux-2.4.29-sparc/include/linux/smp.h:87:1: warning: "smp_call_function" redefined
In file included from /usr/src/linux-2.4.29-sparc/include/linux/modversions.h:281,
from /usr/src/linux-2.4.29-sparc/include/linux/module.h:22,
from sys.c:8:
/usr/src/linux-2.4.29-sparc/include/linux/modules/sparc64_ksyms.ver:32:1: warning: this is the location of the previous definition
In file included from /usr/src/linux-2.4.29-sparc/include/linux/mm.h:4,
from sys.c:9:
/usr/src/linux-2.4.29-sparc/include/linux/sched.h:162:1: warning: "set_cpus_allowed" redefined
In file included from /usr/src/linux-2.4.29-sparc/include/linux/modversions.h:180,
from /usr/src/linux-2.4.29-sparc/include/linux/module.h:22,
from sys.c:8:
|
My current config only differs from this one in that SMP was enabled in the last one that compiled successfully(NOT a module which I think is a mistake I may have made so looks like I get more practice with menuconfig *EDIT* looks like SMP is either there or its not....having it be a module is not an option*EDIT*
Ultimately when SMP is left out, the compile exits about 5 minutes into it with the following:
Code: |
make[2]: *** [ksyms.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.29-sparc/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.29-sparc/kernel'
make: *** [_dir_kernel] Error 2
|
Just wondering if anyone else has had this problem or has come to the same conclusions that I have. Ultimately my goal is to have a kernel with support for only those services/devices which I plan to be using....that is after all one of the benefits to "rolling" your own. |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Fri Aug 12, 2005 5:11 pm Post subject: |
|
|
Did you make dep before recompiling after changing the configuration option? _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
zachula n00b
Joined: 29 Jul 2005 Posts: 19
|
Posted: Tue Aug 16, 2005 6:17 pm Post subject: |
|
|
gust4voz wrote: | Did you make dep before recompiling after changing the configuration option? |
Yes.
I used Code: | make dep && make clean vmlinux image modules modules_install | to compile my kernel both times.
Last edited by zachula on Tue Aug 16, 2005 8:31 pm; edited 1 time in total |
|
Back to top |
|
|
i-right-i Tux's lil' helper
Joined: 08 Nov 2004 Posts: 118 Location: Chandler, AZ USA
|
Posted: Tue Aug 16, 2005 8:02 pm Post subject: |
|
|
I just compiled a non-smp kernel on an intital install of a Ultra 5 and it is running like a top. So it can be done.
I am using sparc sources 2.4.31 if that makes any difference.
i-right-i _________________ Gentoo on x86
Gentoo on SPARC |
|
Back to top |
|
|
spam_ Tux's lil' helper
Joined: 14 Jan 2004 Posts: 105 Location: /dev/null
|
Posted: Mon Aug 22, 2005 11:58 pm Post subject: |
|
|
Quote: |
I used
Code: | make dep && make clean vmlinux image modules modules_install |
to compile my kernel both times.
|
Well that's probably your problem... you're doing 'make clean' AFTER 'make dep'... try something like this:
Code: | make clean && make dep vmlinux image modules modules_install |
|
|
Back to top |
|
|
Nijinski n00b
Joined: 28 Nov 2004 Posts: 72 Location: Fife, Scotland
|
Posted: Tue Aug 23, 2005 6:20 pm Post subject: |
|
|
Someone should really look at the install guide then, that's the order it says to do things there. _________________ Help ! Help ! I'm being repressed |
|
Back to top |
|
|
i-right-i Tux's lil' helper
Joined: 08 Nov 2004 Posts: 118 Location: Chandler, AZ USA
|
Posted: Tue Aug 23, 2005 7:49 pm Post subject: |
|
|
When I did mine, I did mine according to the 2005.1 guide. I haven't looked but if they are the same, which I think they are, then I doubt running a make clean after make dep is the issue.
My Ultra 5 and Ultra 10 have almost exactly the same hardware. They have the same CPU, Ram, Chipset, SoundChip.
Did you try 2.4.31 sparc sources?
i-right-i _________________ Gentoo on x86
Gentoo on SPARC |
|
Back to top |
|
|
Ferris Retired Dev
Joined: 13 Jan 2003 Posts: 426 Location: N. Virginia (USA)
|
Posted: Tue Aug 23, 2005 11:14 pm Post subject: |
|
|
zachula,
Is this still a problem? If so, you might try joining theIRC Freenode #gentoo-sparc channel and asking for a working kernel .config file for a U10 (or for a U5). Or, ask someone in this forum thread for a copy of a working .config. I am not running a U10, but people responding to you are, and certainly people in #gentoo-sparc channel use them, too. Often, people share such .config files when you ask for examples.
Regards, |
|
Back to top |
|
|
ginodouglas n00b
Joined: 24 Aug 2005 Posts: 1
|
Posted: Wed Aug 24, 2005 1:05 pm Post subject: Removing SMP on Ultra10 single proc |
|
|
I coudn't make a useful kernel from sparc-sources 2.4.31, it always panic at boot. I tried to remove SMP and it didn't compile, got a lot of errors. I put back SMP but with only 2 CPU's and now it is working fine.
The box is an Ultra 10, 333MHz, 512MB.
Gino |
|
Back to top |
|
|
i-right-i Tux's lil' helper
Joined: 08 Nov 2004 Posts: 118 Location: Chandler, AZ USA
|
Posted: Fri Aug 26, 2005 4:08 pm Post subject: |
|
|
I will copy my kenerl config tonight when I get home, the box has moved there and hes become a firewall now.
i-right-i _________________ Gentoo on x86
Gentoo on SPARC |
|
Back to top |
|
|
|