Skip to content

Arena/019f954b android kernel xiaomi sm6150 - #11

Open
San9588 wants to merge 16 commits into
crdroidandroid:16.0from
San9588:arena/019f954b-android-kernel-xiaomi-sm6150
Open

Arena/019f954b android kernel xiaomi sm6150#11
San9588 wants to merge 16 commits into
crdroidandroid:16.0from
San9588:arena/019f954b-android-kernel-xiaomi-sm6150

Conversation

@San9588

@San9588 San9588 commented Jul 31, 2026

Copy link
Copy Markdown

No description provided.

San9588 and others added 16 commits July 24, 2026 18:08
- Set HZ to 1000 for better responsiveness
- Enable performance-oriented compiler optimizations
- Enable CPU Boost and MSM Performance drivers
- Optimize ZRAM with LZ4 compression
- Enable TCP Westwood and BBR for better networking
- Enable BFQ I/O scheduler
- Disable various debugging overheads for better performance

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- Increase PD max current limit to 5.5A
- Relax thermal mitigation steps for faster sustained charging
- Align fast charge parameters with stock-like behavior

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- Integrated Polly loop optimizations in root Makefile for Clang builds
- Switched from Full LTO to Thin LTO in phoenix.config for faster builds and better runtime performance
- Added Polly flags: -polly, -polly-opt-isl, -polly-optree, -polly-invariant-load-hoisting, -polly-tiling, -polly-simplify, -polly-run-dce

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- Added POLLY_FLAGS with vectorizer=stripmine, parallelization, tiling
- Enabled invariant load hoisting and dead code elimination
- Included matrix multiplication and tensor contraction optimizations
- Updated snprintf calls to use sizeof(mp_setting_criteria_csv_filename)
  and sizeof(mpcriteria) instead of PAGE_SIZE
- Ensures correct buffer length handling and avoids potential overflow
- Verified all 6 instances now use sizeof
- Wrapped HAVE_KSU_HOOK check with CONFIG_KSU_MANUAL_HOOK/CONFIG_KSU_KPROBES_HOOK
- Ensures error triggers only when manual or kprobes hooks are enabled
- Improves clarity of KernelSU integration checks
- Introduced build.sh helper script
- Provides streamlined build process and automation
- Simplifies invoking toolchain and packaging steps
- Relax thermal-mitigation-icl levels 14/15 (800mA→1.5mA, 750mA→1.3mA)
  to allow charge pump activation even under thermal mitigation
- Add intelligent clamping in kernel driver to prevent userspace thermal
  daemons with miscalibrated sensors from blocking fast charging
- Clamp level 14+ to level 10 when actual temps are safe (connector<55°C,
  smb<80°C, die<80°C) while preserving real overheating protection
- Fixes charging limited to 0.8A despite device being cool

Tested-by: San4255
Co-Authored-By: Claude <noreply@anthropic.com>
- Reduce vm_swappiness from 60 to 20 for less aggressive swapping
- Reduce vfs_cache_pressure from 100 to 50 to keep cache longer
- Enforce dirty_ratio=20 and dirty_background_ratio=10 for writeback
- Enforce deadline I/O scheduler for UFS 2.1 storage
- Enable CPU input boost at max frequencies for instant touch response
- Enable scheduler boost on input for faster touch task scheduling
- Optimize schedutil rate limits per cluster:
  - Little (A55): up=1000us (efficiency), down=5000us (no perf loss)
    - Big (A76): up=500us (aggressive), down=10000us (balanced)
- Add late_initcall to enforce all values after vendor init.rc
- Ensures consistent behavior across all ROMs

Benefits:
- Reduced swap thrashing (81% swap usage issue fixed)
- Better app retention in RAM (multitasking improved)
- Faster file operations (cache + deadline scheduler)
- Instant touch response (input boost enabled)
- Smoother UI (sched boost on touch)
- Better battery efficiency (optimized rate limits)
- Consistent experience regardless of ROM vendor init settings

Tested-by: San4255
Co-Authored-By: Claude <noreply@anthropic.com>
- Add delayed workqueue to re-apply optimizations after vendor init.rc
- Schedule at 60s, 120s, 180s, and 480s to catch late-running services
- Reduce down_rate_limit_us: little 20000->5000, big 20000->10000
- Keep up_rate_limit_us at 500 (original performance value)
- Swappiness and cache_pressure now survive init.rc overrides

Co-Authored-By: Claude <noreply@anthropic.com>
- Move late_initcall + delayed workqueue to separate mm/opt.c
- Elevate to root credentials before sysfs writes via commit_creds()
- Prevents cherry-pick conflicts in frequently-modified mm/vmscan.c
- Re-applies I/O scheduler, CPU boost, rate limits after vendor init

Co-Authored-By: Claude <noreply@anthropic.com>
- Add elevator_change_queue() export to block/elevator.c
- Add cpu_boost_set_params() export to drivers/cpufreq/cpu-boost.c
- Add schedutil_set_down_rate_limit() export to schedutil
- cpu_boost_set_params: direct per-CPU assignment (fixes silent parse fail)
- Fix IO scheduler: use get_gendisk() instead of blkdev_get_by_path()
- Add pr_info logging to all exported functions for debugging
- Update mm/opt.c to use kernel APIs instead of sysfs writes
- Bypasses SELinux restrictions on kernel-context sysfs access

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants