mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
Linux kernel and system-level performance optimization for RK3326
Kernel config: - SCHED_AUTOGROUP=n: Disable task auto-grouping (causes latency spikes) - DRM_PANFROST=y (was m): Build GPU driver into kernel (faster probe) - DRM_FBDEV_EMULATION=n: Remove legacy framebuffer overhead - PROFILING=n: Disable kernel profiling (CPU overhead) - MAGIC_SYSRQ=n: Remove debug code path - PAGE_REPORTING=n: Disable page reporting overhead - BTRFS_FS=n: Remove 300KB+ kernel bloat (unused) - NTFS/NTFS3=n: Remove Windows FS support (unused) - BRIDGE=n: Remove network bridging (unused) Kernel cmdline: - Add nowatchdog: Disable software watchdog timer overhead - Add threadirqs: Run IRQ handlers in threads (better latency) Sysctl tuning: - vm.laptop_mode: 5→0 (was causing I/O batching latency spikes) - vm.dirty_writeback_centisecs: 1500→500 (15s→5s, prevents frame stutters) - vm.vfs_cache_pressure: 200→50 (stop aggressive cache eviction on 1GB RAM) - vm.dirty_ratio: 5→10 (allow more dirty memory before sync) - vm.dirty_background_ratio: 2→5 (less aggressive background writeback) Systemd: - journald: Set Storage=volatile (RAM-only, zero SD card writes)
This commit is contained in:
@@ -205,7 +205,7 @@ CONFIG_USER_NS=y
|
||||
CONFIG_PID_NS=y
|
||||
CONFIG_NET_NS=y
|
||||
# CONFIG_CHECKPOINT_RESTORE is not set
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
# CONFIG_SCHED_AUTOGROUP is not set
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE="@INITRAMFS_SOURCE@"
|
||||
@@ -270,7 +270,7 @@ CONFIG_PERF_EVENTS=y
|
||||
# end of Kernel Performance Events And Counters
|
||||
|
||||
CONFIG_SYSTEM_DATA_VERIFICATION=y
|
||||
CONFIG_PROFILING=y
|
||||
# CONFIG_PROFILING is not set
|
||||
|
||||
#
|
||||
# Kexec and crash features
|
||||
@@ -948,7 +948,7 @@ CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
|
||||
CONFIG_SPLIT_PMD_PTLOCKS=y
|
||||
CONFIG_COMPACTION=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_PAGE_REPORTING=y
|
||||
# CONFIG_PAGE_REPORTING is not set
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
|
||||
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
|
||||
@@ -1355,7 +1355,7 @@ CONFIG_INET_SCTP_DIAG=m
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_L2TP is not set
|
||||
CONFIG_STP=m
|
||||
CONFIG_BRIDGE=m
|
||||
# CONFIG_BRIDGE is not set
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
# CONFIG_BRIDGE_VLAN_FILTERING is not set
|
||||
# CONFIG_BRIDGE_MRP is not set
|
||||
@@ -3609,7 +3609,7 @@ CONFIG_DRM_KMS_HELPER=y
|
||||
# CONFIG_DRM_DEBUG_MODESET_LOCK is not set
|
||||
CONFIG_DRM_CLIENT_SELECTION=y
|
||||
CONFIG_DRM_CLIENT_SETUP=y
|
||||
CONFIG_DRM_FBDEV_EMULATION=y
|
||||
# CONFIG_DRM_FBDEV_EMULATION is not set
|
||||
CONFIG_DRM_FBDEV_OVERALLOC=200
|
||||
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
|
||||
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
|
||||
@@ -3831,7 +3831,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
|
||||
# CONFIG_TINYDRM_ST7735R is not set
|
||||
# CONFIG_DRM_PL111 is not set
|
||||
# CONFIG_DRM_LIMA is not set
|
||||
CONFIG_DRM_PANFROST=m
|
||||
CONFIG_DRM_PANFROST=y
|
||||
# CONFIG_DRM_PANTHOR is not set
|
||||
# CONFIG_DRM_TIDSS is not set
|
||||
# CONFIG_DRM_GUD is not set
|
||||
@@ -6009,12 +6009,7 @@ CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
CONFIG_BTRFS_FS=y
|
||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
|
||||
# CONFIG_BTRFS_DEBUG is not set
|
||||
# CONFIG_BTRFS_ASSERT is not set
|
||||
# CONFIG_BTRFS_FS_REF_VERIFY is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
# CONFIG_F2FS_FS is not set
|
||||
# CONFIG_BCACHEFS_FS is not set
|
||||
@@ -6073,11 +6068,8 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
# CONFIG_FAT_DEFAULT_UTF8 is not set
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
CONFIG_NTFS3_FS=m
|
||||
# CONFIG_NTFS3_64BIT_CLUSTER is not set
|
||||
# CONFIG_NTFS3_LZX_XPRESS is not set
|
||||
# CONFIG_NTFS3_FS_POSIX_ACL is not set
|
||||
CONFIG_NTFS_FS=m
|
||||
# CONFIG_NTFS3_FS is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
# end of DOS/FAT/EXFAT/NT Filesystems
|
||||
|
||||
#
|
||||
@@ -6739,10 +6731,7 @@ CONFIG_FRAME_POINTER=y
|
||||
#
|
||||
# Generic Kernel Debugging Instruments
|
||||
#
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
|
||||
CONFIG_MAGIC_SYSRQ_SERIAL=y
|
||||
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_DEBUG_FS_ALLOW_ALL=y
|
||||
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
KERNEL_MAKE_EXTRACMD=" $(get_kernel_make_extracmd)"
|
||||
|
||||
# Kernel cmdline
|
||||
EXTRA_CMDLINE="quiet console=ttyS2,1500000 console=tty0 loglevel=0 vt.global_cursor_default=0 consoleblank=0 net.ifnames=0 systemd.show_status=false mitigations=off audit=0 loop.max_loop=16"
|
||||
EXTRA_CMDLINE="quiet console=ttyS2,1500000 console=tty0 loglevel=0 vt.global_cursor_default=0 consoleblank=0 net.ifnames=0 systemd.show_status=false mitigations=off audit=0 nowatchdog threadirqs loop.max_loop=16"
|
||||
|
||||
# Bootloader to use (syslinux / u-boot)
|
||||
BOOTLOADER="u-boot"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
[Journal]
|
||||
Storage=volatile
|
||||
RuntimeMaxUse=16M
|
||||
RuntimeMaxFileSize=4M
|
||||
@@ -1,7 +1,7 @@
|
||||
vm.swappiness=1
|
||||
kernel.nmi_watchdog=0
|
||||
vm.laptop_mode=5
|
||||
vm.dirty_writeback_centisecs=1500
|
||||
vm.vfs_cache_pressure=200
|
||||
vm.dirty_ratio=5
|
||||
vm.dirty_background_ratio=2
|
||||
vm.swappiness=1
|
||||
vm.laptop_mode=0
|
||||
vm.dirty_writeback_centisecs=500
|
||||
vm.vfs_cache_pressure=50
|
||||
vm.dirty_ratio=10
|
||||
vm.dirty_background_ratio=5
|
||||
|
||||
@@ -197,7 +197,8 @@ post_makeinstall_target() {
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-time-wait-sync.service
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/systemd-time-wait-sync
|
||||
|
||||
# tune journald.conf
|
||||
# tune journald.conf - volatile storage (RAM only, no SD writes)
|
||||
sed -e "s,^.*Storage=.*$,Storage=volatile,g" -i ${INSTALL}/etc/systemd/journald.conf
|
||||
sed -e "s,^.*Compress=.*$,Compress=no,g" -i ${INSTALL}/etc/systemd/journald.conf
|
||||
sed -e "s,^.*MaxFileSec=.*$,MaxFileSec=0,g" -i ${INSTALL}/etc/systemd/journald.conf
|
||||
sed -e "s,^.*MaxRetentionSec=.*$,MaxRetentionSec=0,g" -i ${INSTALL}/etc/systemd/journald.conf
|
||||
|
||||
Reference in New Issue
Block a user