Freebsd AMD64 Kernel Configuration

I just registered into Freebsd forum, in order to get expereince and communicate with senior freebsd users and experts. I have been starting to use freebsd (amd64) instead of i386 for more than 3 months, but I curious about the kernel optimization, what I know about kernel optimizations are all about i386 structure, I am wondering if there is an instruction existing. Right now I just disabled unused hardware entries in kernel file and rebuild. Can someone help me?
thanks
 
Hi there,

I didn't answer yet, 'cause I thought maybe someone else hat something to say ;)

Well yesterday I did my first try to create a kernel without any modules...it ran...but PPP/PPPoE didn't work anymore. Yah, I forgot to build-in. but later I realized that I wasn't able to build it in. If I use options ppp or device ppp it won't work. After some time using Google, I read something about pseudo-device but this directive also didn't work. Due to the fact that I didn't found this directive in LINT kernel configuration, I guess it's not in use any longer (if I err please submit reply ;) ).

But that's not the topic.
First of all I did the same like you. I commented all (for my system) useless lines in GENERIC out (and added some too, 'cause for example device pf or options ALTQ is typically no part of GENERIC kernel configuration, but I need them for pf firewall).
Then I use # kldstat to get a list with all modules loaded and started to add them directly to the kernel or use directive makeoptions MODULES_OVERRIDE=" " to build ONLY modules I specified here.
If you want a kernel configuration with all possible directives in, have a look for # make LINT in FreeBSD handbook or google. I for my share didn't use LINT yet, 'cause all comments are cut off :/ and I don't want to google for more then 800 directives (or search for them in NOTES files everywhere).

In my make.conf I specified CPUTYPE=noncona only (Yes, I removed the question mark after CPUTYPE, because I don't ever want to use this kernel on another machine than this one). There is no need for setting any CFLAGS, or else 'cause FreeBSD already set optimal build settings in Makefile or most ports and would override your own settings anyway.

Best Regards
 
eric said:
<...> curious about the kernel optimization, <...> I am wondering if there is an instruction existing. <...> Can someone help me?
thanks
cp /usr/share/examples/etc/make.conf /etc
Code:
#   AMD64 architecture: opteron, athlon64, nocona, prescott, core2
Code:
CPUTYPE?=[your ARCH here]
 
@werner, LINT is already done.

Common options/devices for all architectures:
/usr/src/sys/conf/NOTES

Architecture specific options/devices:
/usr/src/sys/<architecture>/conf/NOTES
 
>I rarely see much point in customizing one's kernel.

1.) different options only available while compiling a new kernel
2.) a slim kernel (e.g. for embedded systems, routers etc. pp.)
3.) to solve problems

Points I see once in a while especially while dealing with FreeBSD.
 
Hello, guys,

Our CPU is identified as
Code:
CPU: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz (2660.01-MHz K8-class CPU)

Which CPUTYPE would be the optimal choice for that?
Code:
#   AMD64 architecture: opteron, athlon64, nocona, prescott, core2

TIA
 
"core2" builds with "march=nocona" under AMD64. This make option will "only" affect the build of libcrypto and libz, to use the sse3 feature. dunno if it is possible too, to use the SSE4.2 feature your cpu has builtin.

You may also want to build
Code:
device coretemp
for Intel CPUs into your kernel.
 
User23 said:
"core2" builds with "march=nocona" under AMD64. This make option will "only" affect the build of libcrypto and libz, to use the sse3 feature. dunno if it is possible too, to use the SSE4.2 feature your cpu has builtin.
I already set nocona after some reading of "man gcc" without waiting for replies to this thread. I believe CPUTYPE=core2 is treated specially by FreeBSD (and not simply passed on to gcc) because it isn't listed as one of the -mcpu types in the manpage. Did I miss anything?

You may also want to build
Code:
device coretemp
for Intel CPUs into your kernel.
I can guess what it does, I guess I'll try this some time.
 
rihad said:
I already set nocona after some reading of "man gcc" without waiting for replies to this thread. I believe CPUTYPE=core2 is treated specially by FreeBSD (and not simply passed on to gcc) because it isn't listed as one of the -mcpu types in the manpage. Did I miss anything?

"nocona" is correct for your environment. With "core2" it will link to "prescott" if you build FreeBSD i386 and will link to "nocona" if you build FreeBSD AMD64.

rihad said:
I can guess what it does, I guess I'll try this some time.

I monitor the temperatures of at least on core per DIE because mostly it is impossible to monitor the CPU fans.
 
Back
Top