Hi, For (ARM) SBCs with limited computational power, stripping out unused features from the kernel sometimes improves the performance, depending on usage.
For my use case of packet filtering by RPi4B, CONFIG_PARAVIRT=n CONFIG_DEBUG_KERNEL=n each of the above increases the throughput of the packet filtering router by about 100Mbps, from the baseline 600Mbps by linux-image-rt-arm64 5.10. The above options cannot be disabled in Debian kernel package for its wider use cases. Rebuild of linux-image-rt-arm64 was done by https://github.com/emojifreak/debian-rpi-image-script/blob/main/build-debian-raspi-kernel.sh On the other hand, I am wondering why the following options are currently disabled by Debian arm64 kernel 5.10 package: CONFIG_CLEANCACHE: Cleancache can be thought of as a page-granularity victim cache for clean pages that the kernel's pageframe replacement algorithm (PFRA) would like to keep around, but can't since there isn't enough memory. So when the PFRA "evicts" a page, it first attempts to use cleancache code to put the data contained in that page into "transcendent memory", memory that is not directly accessible or addressable by the kernel and is of unknown and possibly time-varying size. And when a cleancache-enabled filesystem wishes to access a page in a file on disk, it first checks cleancache to see if it already contains it; if it does, the page is copied into the kernel and a disk access is avoided. When a transcendent memory driver is available (such as zcache or Xen transcendent memory), a significant I/O reduction may be achieved. When none is available, all cleancache calls are reduced to a single pointer-compare-against-NULL resulting in a negligible performance hit. If unsure, say Y to enable cleancache This is enabled by other distros.: https://hlandau.github.io/kconfigreport/option/CONFIG_CLEANCACHE.xhtml CONFIG_ZONE_DEVICE: Device memory hotplug support allows for establishing pmem, or other device driver discovered memory regions, in the memmap. This allows pfn_to_page() lookups of otherwise "device-physical" addresses which is needed for using a DAX mapping in an O_DIRECT operation, among other things. If FS_DAX is enabled, then say Y. (FS_DAX is enabled in Debian arm64 kernel 5.10 package) CONFIG_IRQ_TIME_ACCOUNTING: Select this option to enable fine granularity task irq time accounting. This is done by reading a timestamp on each transitions between softirq and hardirq state, so there can be a small performance impact. (My observation suggests CONFIG_PARAVIRT=y having much higher overhead.) If in doubt, say N here. The above CONFIG_IRQ_TIME_ACCOUNTING enables %hi in "top". See also "Is Your Linux Version Hiding Interrupt CPU Usage From You?" https://tanelpoder.com/posts/linux-hiding-interrupt-cpu-usage/ CONFIG_PARAVIRT_TIME_ACCOUNTING has a similar role for linux-image-cloud-arm64: Select this option to enable fine granularity task steal time accounting. Time spent executing other tasks in parallel with the current vCPU is discounted from the vCPU power. To account for that, there can be a small performance impact. If in doubt, say N here. The above enables "%st" in "top". Some other distros seem enabling it: https://hlandau.github.io/kconfigreport/option/CONFIG_PARAVIRT_TIME_ACCOUNTING.xhtml Best regards, Ryutaroh Matsumoto