KERNEL_CHANGES.md 3.84 KiB
Newer Older
# Kernel Changes
Melroy van den Berg's avatar
Melroy van den Berg committed
See below the sub-sections and for each section the **changes** that are done in the Kernel Config.

## General setup

# Set custom kernel version

CONFIG_LOCALVERSION="melvalds-1.0"
```

## Kernel hacking -> Compile-time checks and compiler options

```conf
# Disable debug explicitly, so no dbg packages are created
CONFIG_DEBUG_INFO=n
## General setup -> Preemption Model

```conf
# Enable Kernel preemption!

# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y

## RCU Subsystem

```conf
# Enable PREEMPT_RCU

CONFIG_PREEMPT_RCU=y
CONFIG_RCU_EXPERT=y

CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FAST_NO_HZ is not set
CONFIG_RCU_BOOST=y
CONFIG_RCU_BOOST_DELAY=0
CONFIG_RCU_NOCB_CPU=y
# CONFIG_TASKS_TRACE_RCU_READ_MB is not set
```

## Processor type and features

```conf
# Just support X86 CPUs (the majority)

# CONFIG_X86_EXTENDED_PLATFORM is not set
```

## Performance monitoring | Gasket devices | Intel Speed Select Technology interface support

```conf
Melroy van den Berg's avatar
Melroy van den Berg committed
# Increase the timer interrupt frequency to 1000HZ

# CONFIG_HZ_250 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000

# Disable all laptops modules and related modules;
#  don't use a laptop for gaming/real-time apps, use a decent desktop PC.

# CONFIG_I8K is not set
# CONFIG_ALIENWARE_WMI is not set
# CONFIG_HUAWEI_WMI is not set
# CONFIG_XIAOMI_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_ACER_WMI is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_ASUS_WIRELESS is not set
# CONFIG_ASUS_WMI is not set
# CONFIG_EEEPC_LAPTOP is not set
# CONFIG_DELL_LAPTOP is not set
# CONFIG_DELL_WMI is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_HP_WIRELESS is not set
# CONFIG_HP_WMI is not set
# CONFIG_IDEAPAD_LAPTOP is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_SURFACE3_WMI is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_MSI_WMI is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_LG_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_MFD_CROS_EC is not set
# CONFIG_CHROME_PLATFORMS is not set
```

## Power management and ACPI options

```conf
# Disable suspend features (I hate suspend), also therefor tracing is not needed anymore

# CONFIG_SUSPEND is not set
# CONFIG_PM_TRACE_RTC is not set

## Power management and ACPI options -> CPU Frequency scaling

```conf
# Disable the two lowest power saving options (switching between CPU frequency scales takes time, causing latencies)

# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
## Networking options

```conf
# Improve network speeds
Melroy van den Berg's avatar
Melroy van den Berg committed
# Enable Google BBR TCP protocol (instead of cubic) as default congestion control

CONFIG_TCP_CONG_CUBIC=m
CONFIG_TCP_CONG_BBR=y
CONFIG_DEFAULT_BBR=y
CONFIG_DEFAULT_TCP_CONG="bbr"
```

Melroy van den Berg's avatar
Melroy van den Berg committed
## Queueing/Scheduling

```conf
# Enable Propertial Integral Controller Enhanced module: rfc8033, addressing the Bufferbloat problem

CONFIG_NET_SCH_FQ_PIE=m
```

Melroy van den Berg's avatar
Melroy van den Berg committed
## DMA Devices

```conf
# Enable all direct access memory modules

CONFIG_INTEL_IDXD=m
CONFIG_PLX_DMA=m
CONFIG_XILINX_ZYNQMP_DPDMA=m
CONFIG_SF_PDMA=m
```

## DMABUF options

```conf
Melroy van den Berg's avatar
Melroy van den Berg committed
# DMA buffer shared between drivers in Userland, System heap and CMA heap 
Melroy van den Berg's avatar
Melroy van den Berg committed

CONFIG_DMABUF_HEAPS=y
CONFIG_DMABUF_HEAPS_SYSTEM=y
CONFIG_DMABUF_HEAPS_CMA=y
```

## x86 Debugging

```conf
# Change to ORC unwinder (iso frame pointer), which increase performance because the debuginfo is out of band

CONFIG_UNWINDER_ORC=y
# CONFIG_UNWINDER_FRAME_POINTER is not set
```