Kernel Sources:       sys-kernel/gentoo-sources

Kernel Version:       4.14.4

Last Updated on:      06/12/2017

Update Notice:        1- Added 'CONFIG_X86_5LEVEL' to 'Processor type and features  --->'
                      2- Added 'CONFIG_ORC_UNWINDER' to 'Kernel hacking  --->'
                      3- Excluded swap options (in DOTSLASHLINUX.config only and not in the guides)
                      4- Removed 32-bit support (in DOTSLASHLINUX.config only and not in the guides)
                      5- Switched to EXT4 from XFS (in DOTSLASHLINUX.config only and not in the guides)

Priorities:           1- high performance
                      2- minimal
                      3- low memory footprint
                      4- small size
                      5- power saving
                      6- security
                      7- low-latency

Configuration File:   https://www.dotslashlinux.com/dotfiles/kernel/DOTSLASHLINUX.config

Total Options:        2646 (grep -c 'CONFIG_' DOTSLASHLINUX.config)

Included Options:     741 (grep -c '=y' DOTSLASHLINUX.config)

Excluded Options:     1841 (grep -c 'is not set' DOTSLASHLINUX.config)

Final Size (LZ4):     6,508,496 Bytes

Total Patches:        1 (UKSM-4.14 Patch) (https://github.com/dolohow/uksm/blob/master/uksm-4.14.patch)

Contributors:         Firas Khalil Khana [irc: firas] [email: firasuke@gmail.com]

Side Notes:           1- Options that aren't listed here are excluded [ ].
                      2- These guides provide users with a solid starting setup to build on.
                      3- These guides are constantly being updated.
                      4- If there's something I didn't explain properly or I misexplained
                         then please do let me know either by kindly leaving a comment below
                         or sending me an email on: firasuke@gmail.com
                      5- If you found these guides helpful, then please don't forget to
                         support DOTSLASHLINUX on Patreon:

                            https://www.patreon.com/DOTSLASHLINUX

                         or on PayPal:

                            https://www.paypal.me/DOTSLASHLINUX/5
Part Section Link
1 Intro Click Here
2 [*] Gentoo Linux support ---> Click Here
3 General setup ---> Click Here
4 [*] Enable loadable module support ---> Click Here
5 [*] Enable the block layer ---> Click Here
6 Processor type and features ---> Click Here
7 Power management and ACPI options ---> Click Here
8 Bus options (PCI etc.) ---> Click Here
9 Executable file formats / Emulations ---> Click Here
10 [*] Networking support ---> Click Here
11 Device Drivers ---> Click Here
12 Firmware Drivers ---> Click Here
13 File systems ---> Click Here
14 Kernel hacking ---> Click Here
15 Security options ---> Click Here
16 -*- Cryptographic API ---> Click Here
17 [*] Virtualization ---> Click Here
18 Library routines ---> Click Here

The Linux Kernel Configuration Guide Part 14

kernel14
Firas Khalil Khana | 14/09/2017

Kernel hacking —>

printk and dmesg options —>

[*] Show timing information on printks

Symbol:     CONFIG_PRINTK_TIME

Help:       Selecting this option causes time stamps of the printk()
            messages to be added to the output of the syslog() system
            call and at the console.

            The timestamp is always recorded internally, and exported
            to /dev/kmsg. This flag just specifies if the timestamp should
            be included, not that the timestamp is recorded.

            The behavior is also controlled by the kernel command line
            parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst

Type:       boolean

Choice:     built-in [*]

Reason:     It's highly recommended that you include this option in your kernel
            as timestamps add another level of precision to your system logs.

(15) Default console loglevel (1-15)

Symbol:     CONFIG_CONSOLE_LOGLEVEL_DEFAULT

Help:       Default loglevel to determine what will be printed on the console.

            Setting a default here is equivalent to passing in loglevel=<x> in
            the kernel bootargs. loglevel=<x> continues to override whatever
            value is specified here as well.

            Note: This does not affect the log level of un-prefixed printk()
            usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT
            option.

Type:       integer

Choice:     (15) custom

Reason:     It's recommended that you set the value of this option to a value
            that ensures enough verbosity is being used.

            If you've already excluded a bunch of debugging options to minimize
            system overhead, then you'd likely want to set the value of this
            option and CONFIG_MESSAGE_LOGLEVEL_DEFAULT to a high enough value
            to get enough information.

(7) Default message log level (1-7)

Symbol:     CONFIG_MESSAGE_LOGLEVEL_DEFAULT

Help:       Default log level for printk statements with no specified priority.

            This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
            that are auditing their logs closely may want to set it to a lower
            priority.

            Note: This does not affect what message level gets printed on the console
            by default. To change that, use loglevel=<x> in the kernel bootargs,
            or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value.

Type:       integer

Choice:     (7) custom

Reason:     It's recommended that you set the value of this option to a value
            that ensures enough verbosity is being used.

            If you've already excluded a bunch of debugging options to minimize
            system overhead, then you'd likely want to set the value of this
            option and CONFIG_CONSOLE_LOGLEVEL_DEFAULT to a high enough value
            to get enough information.

Compile-time checks and compiler options —>

(0) Warn for stack frames larger than (needs gcc 4.4)

Symbol:     CONFIG_FRAME_WARN

Help:       Tell gcc to warn at build time for stack frames larger than this.
            Setting this too low will cause a lot of warnings.
            Setting it to 0 disables the warning.
            Requires gcc 4.4 

Type:       integer

Choice:     (0) custom

Reason:     If you can live with the warnings then don't disable this option.

-*- Kernel debugging

Symbol:     CONFIG_DEBUG_KERNEL

Help:       Say Y here if you are developing drivers or trying to debug and
            identify kernel problems.

Type:       boolean

Choice:     built-in -*-

Reason:     Forcibly included by CONFIG_EXPERT.

(0) panic timeout

Symbol:     CONFIG_PANIC_TIMEOUT

Help:       Set the timeout value (in seconds) until a reboot occurs when the
            the kernel panics. If n = 0, then we wait forever. A timeout
            value n > 0 will wait n seconds before rebooting, while a timeout
            value n < 0 will reboot immediately.

Type:       integer

Choice:     (0) custom

Reason:     Setting the value of this option to (0) will give you all the time
            you want to carefully examine the cause of the kernel panic.

RCU Debugging —>

(3) RCU CPU stall timeout in seconds

Symbol:     CONFIG_RCU_CPU_STALL_TIMEOUT

Help:       If a given RCU grace period extends more than the specified
            number of seconds, a CPU stall warning is printed.  If the
            RCU grace period persists, additional CPU stall warnings are
            printed at more widely spaced intervals.

Type:       integer

Choice:     (3) custom

IO delay type (no port-IO delay) —>

(X) no port-IO delay

Symbol:     CONFIG_IO_DELAY_NONE

Help:       No port-IO delay. Will break on old boxes that require port-IO
            delay for certain operations. Should work on most new machines.

Type:       boolean

Choice:     built-in (X)

Reason:     It's highly recommended that you include this option in your kernel
            if you're on a modern system.

Choose kernel unwinder (ORC unwinder) —>

(X) ORC unwinder

Symbol:     CONFIG_ORC_UNWINDER

Help:       This option enables the ORC (Oops Rewind Capability) unwinder for
            unwinding kernel stack traces.  It uses a custom data format which is
            a simplified version of the DWARF Call Frame Information standard.
            
            This unwinder is more accurate across interrupt entry frames than the
            frame pointer unwinder.  It also enables a 5-10% performance
            improvement across the entire kernel compared to frame pointers.

            Enabling this option will increase the kernel's runtime memory usage
            by roughly 2-4MB, depending on your kernel config.

Type:       boolean

Choice:     built-in (X)

Reason:     It's highly recommended that you include this option in your kernel
            as it provides better performance over other unwinders as it disables
            frame pointers thus making certain system calls faster by at least 1%
            up to 10%.

Chinese Translation

One of DOTSLASHLINUX’s followers from china 杨鑫 (Yang Mame), decided to follow up with the series and provide chinese translation of the kernel configuration guides on his blog.

To read this guide in chinese click here.

Leave A Comment

Become a Patron

If you liked the website and wanted to keep it up and running while remaining ads free then kindly consider supporting DOTSLASHLINUX on Patreon.

Patreon

A huge thank you to all DOTSLASHLINUX patrons:

Crosby Smith (1st Patron)

Recommended Distributions

Gentoo Linux Void Linux Arch Linux

Upcoming Articles

  • Best QEMU and KVM Configuration for Windows Guests on Linux Hosts