neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
166 stars 21 forks source link

Custom kernel config management #1093

Open mikhail-sakhnov opened 1 month ago

mikhail-sakhnov commented 1 month ago

Problem description / Motivation

Currently we store custom kernel config as one large text blob in the github https://github.com/neondatabase/autoscaling/blob/main/neonvm/hack/kernel/linux-config-6.1.92

With the #850 it is changed to two large text blobs: one config is for x86_64, another one is for aarch64.

While it works and provides us working kernel, it is hard to manage:

It would be great to store in the repo instead of the full config only the difference from the default one and use linux/scripts/kconfig/merge_config.sh from the kernel source tree.

Currently, difference with default x86_64 config (provided by make ARCH=x86_64 defconfig) is ~4k lines:

~/linux-6.1.92$ diff .config ~/autoscaling/neonvm/hack/kernel/linux-config-amd64-6.1.92 | wc -l
4083

Feature idea(s) / DoD

DoD: we have reliable way to manage kernel configuration for different architectures.

Implementation ideas

We should utilize them scripts and makefile targets in the linux kernel source tree, there are plenty of them to work with configuration management.

Option 1.

Store config only with those variables and values that are important for us, during build use make oldconfig or kconfig/merge_config.sh to merge our changes with default config.