LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-15-2010, 09:31 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Best options for lite 2.6.33 current kernel compile on K7/K8 PC's?


Just wonderin from slacksperts how I can compile kernel for my pc's as generic
with lightest ram,etc possible?

heres for my K7

Code:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 6
model		: 8
model name	: AMD Athlon(tm) XP 2400+
stepping	: 1
cpu MHz		: 1997.207
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
bogomips	: 3994.41
clflush size	: 32
cache_alignment	: 32
address sizes	: 34 bits physical, 32 bits virtual
power management: ts
and K8
Code:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 12
model name	: AMD Athlon(tm) 64 Processor 3300+
stepping	: 0
cpu MHz		: 2411.322
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow up
bogomips	: 4822.64
clflush size	: 64
power management: ts fid vid ttp
I should use non-smp generic yes??
how to optimize for best performance??

thanks
and I need initrd yes?

EDIT: I have no 64 bit distros
should I use a 64bit distro with K8?

Last edited by linus72; 03-15-2010 at 09:32 AM.
 
Old 03-15-2010, 10:04 AM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Quote:
Originally Posted by linus72 View Post
Just wonderin from slacksperts how I can compile kernel for my pc's as generic
with lightest ram,etc possible?
Just to understand you properly: You want to compile a kernel that runs on any i386 based cpu (generic), that includes as few additional features as possible?

Quote:

heres for my K7

Code:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 6
model		: 8
model name	: AMD Athlon(tm) XP 2400+
stepping	: 1
cpu MHz		: 1997.207
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up
bogomips	: 3994.41
clflush size	: 32
cache_alignment	: 32
address sizes	: 34 bits physical, 32 bits virtual
power management: ts
and K8
Code:
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 12
model name	: AMD Athlon(tm) 64 Processor 3300+
stepping	: 0
cpu MHz		: 2411.322
cache size	: 256 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow up
bogomips	: 4822.64
clflush size	: 64
power management: ts fid vid ttp
You can compile a kernel optimized for K7 and K8. The appropriate options are CONFIG_MK8 and CONFIG_MK7. If you really want the best optimized kernel for your system, go through all options, examine your local hardware and select only options you really need. The best choice does not only depend on the CPU you are using but also on the remaining hardware.

Quote:
I should use non-smp generic yes??
how to optimize for best performance??

thanks
and I need initrd yes?

EDIT: I have no 64 bit distros
should I use a 64bit distro with K8?
You can use SMP on single cpu system. I'm not sure, but I read, that sometimes an SMP enabled kernel runs faster, than a non-smp kernel (on a single cpu system).

You only need an initrd, if the kernel does not include drivers that are necessary to access a filesystem with the additional kernel modules in it. So the kernel either has to have the harddisk driver and filesystem driver built-in or you will need an initrd for sure.

But for a best optimized kernel, you should have those drivers built-in statically.
 
1 members found this post helpful.
Old 03-15-2010, 12:00 PM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I'd start with the config file for the normal generic kernel, add support for the root filesystem you are using and use the arch for the exact cpu you have. Any further optimizations will be hard-won as you must try or investigate them pretty much one at a time. There is considerable cruft still in the generic config, but not easy to cull out...
 
1 members found this post helpful.
Old 03-15-2010, 12:14 PM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
no doubt
hello gnashley
havent seen you in awhile


i made the kernel, it seems good...

I made it K7, no-smp, and got rid of suspend/hibernate

add support for root filesystem??
it doesn't have that in there already?
I didnt do anything about filesystem....?

how do I add support for ext3?
all my systems are ext3
 
Old 03-15-2010, 02:40 PM   #5
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 143Reputation: 143
In menuconfig, go under Filesystems and press 'y' on 'Ext3 journaling file system support' so it's built into the kernel and not as a module.

Last edited by piratesmack; 03-15-2010 at 02:43 PM.
 
Old 03-15-2010, 03:13 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK
Heres whole config


http://multidistro.com/Kernels/confi...ic-2.6.29.6-K7

does that look right?
 
Old 03-15-2010, 03:14 PM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
generic kernels basically don't include support for any filesystem -adding just that means you don't need an initrd.
 
Old 03-15-2010, 03:15 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I heard it uses less ram,etc if you have initrd?
 
Old 03-16-2010, 02:26 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
No. Using an initrd will only slow your boot-time slightly and make your kernel updates more complicated.
 
1 members found this post helpful.
Old 03-16-2010, 10:55 AM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK

so, I hve now successfully compiled 4 kernels for my K8
1) 2.6.27.31 for my 12.2 install

2) 2.6.32.7 for my Absolute 13.0 install

3) 2.6.29.6 for 13 slackware install

4) 2.6.33 for Current install

was wonderin just how far a kernel can be strippped?
I cut out like toshiba/dell laptop support
hibernate/suspend gone
I made ext3 * for all kernels
took out jfs and reiserfs support
took out -smp thing

thats about it, and made it K8 too of course

I also uncommented some modules in /etc/rc.modules-*
like for fan/thermal,etc
and my fans (HP cool&quiet) do seem to whir up under load
so I guess thats good?

all the kernels work great and it does boot faster
dont really know if I'm saving much in terms of performance

but, its better than a hugesmsp.s or generic setup right??
thanks
 
Old 03-16-2010, 01:29 PM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
It is certainly satisfying to have a roll-your-own kernel. Just looking around and investigating what else might be left out is a good exercise if you want to learn more about the kernel. My kernels are considerably smaller than the generic kernels, but for distributing them, you need to include more general-support items.
Make yourself a file to keep notes in, then go along removing only one or thwo things at a time and writing down which ones they were. When you run acros something that causes your kernel to be non-functional, you'll know what it was and can eliminate that from your list of items to remove. I find that works better than starting from 'scratch' and trying to figure out what all you need to get a 'barely-bootable' configuration.
 
  


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
Kernel compile options for AMD64 in slackware Steve50 Slackware 4 02-20-2006 02:22 PM
Little options if I don't compile the Kernel on Slackware ItalianMetallic Linux - Software 11 01-30-2006 06:54 AM
kernel compile options keysoft Linux - Newbie 4 02-24-2005 12:01 AM
Default options for kernel compile... guddler Mandriva 2 03-19-2004 05:12 PM
Kernel compile options Sammy2ooo Linux - General 4 11-26-2003 07:43 AM

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

All times are GMT -5. The time now is 08:48 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