Releases: THEBOSS619/Note9-ZeusKernelQ-OneUI-AOSP
Stable ZeusKernel Android OneUI2.1 for Note9
This the stable release for Android OneUI 2.1 ROM.
This is a huge list which I will try to simplify it as much as possible.
-
Kernel are now using a Dynamic Tick which will be called when a CPU goes into idle state. The code evaluates the next scheduled timer event (from both hrtimers and the timer wheel) and in case that the next event is further away than the next tick it reprograms the sched_tick to this future event, to allow longer idle sleeps without worthless interruption by the periodic tick. The function is also called when an interrupt happens during the idle period, which does not cause a reschedule. The call is necessary as the interrupt handler might have armed a new timer whose expiry time is before the time which was identified as the nearest event in the previous call to hrtimer.
-
That enables a kernel to run without a regular timer tick. The timer tick is a timer interrupt that is usually generated HZ times per second. Running without a timer tick means the kernel does less work when idle and can potentially save power because it does not have to wake up regularly just to service the timer.
-
This allows to run continuously on the CPU with as few interruptions as possible to other cores and keeping all the polling, ticks, and others to 1 core at least. These can reduce the number of OS-related interrupts and reduce packet transit times. This lowers latencies and improving determinism.
A full example about what is happening during those scenarios of dynamic tick :-
This is what kernel are trying to do... Making all the noise ticks to 1 little core and isolating all other cores clean and relaxed on casual usages.
Kernel Changes on OneUI Compared to latest ones are:-
- Latest Kernel source from Samsung is being used.
- Undervolted the whole SOC for CPU Bus/CPU Clusters/GPU/DDR and other subsystems
- Upstreamed Scheduler further to latest patches and commits
- Merged some Samsung's media enc/dec-coding drivers updates from newer Samsung devices
- Changed workqueue operation tasks and threads to CPU 0 to isolate from other cores which leads to elimination other cores from getting exposed to unimportant tasks, interruptions or even race to it.
- Scheduling ticks, RCU operations and others are now bound to CPU 0 as it helps to isolate other cores from getting the noise of ticks, scheduling mechanisms that happens frequently across all cores.
- Prevent or lower the chance of preemption from happening to other tasks so that it won't interrupt other important tasks or drivers from operating or functioning which leads to lower latency for other tasks.
- Used interruptible waits on couple of the drivers that is fine to get interrupted by other important tasks for improved coherency.
- Upstreamed sched_util governor to latest patches available up to mainline kernel commits 5.4k+.
- Implemented DSBoost mechanism and use it by default.
- Introduce kernel space battery saver mode This driver creates a sysfs toggle that can be enabled when battery saver mode is activated in userspace, and provides functions to check the status of battery saver and to activate it from anywhere in the kernel. The former can be used to disable features that may otherwise drain battery faster, such as CPU and DDR boosting.
- Implement and Use EAS dynamic boosting mechanism which is used for improved UI performance and Added toggle for EAS switches.
- Blocked Samsung's tweaks from being applied on the kernel as we are using an updated scheduler , FAIR, KAIR, and others to avoid conflicts from happening.
- Upstreamed some of Simple LMK related patches and applied it.
- Updated and Adapted MoroSound driver to latest version available v2.1.1
- Upstreamed CGROUP drivers and functions related to it up to 5.0k+ commits and patches.
- Import/Backport Note 20 updates/patches drivers for ACPM as it is needed for upstreamed commits to work properly due to outdated Note 9 ones causing troubles.
- Upstreamed CPUSet drivers and related functions to 5.0k+ commits and patches which improves selection of CPU logic.
- Tuned number of jiffies CPU is permitted to sleep which should provide more power efficiency and at the same time we prevent the system from hanging during full_no_hz operation mode.
- Fixed various sensors from slow response on various sensor detection due to changes of ticks functionality.
- Tuned up Exynos 9810 SOC operations generally for improved battery life and performance.
- Upstreamed OOM reaper , Kswapd, and generally for Memory management furthermore for improved multitasking performance.
- Improved parking of stopped CPUs for further more battery life.
- Remove frequent allocations on dma-buffer for fences for increased render performance.
- Introduced Proactive Compaction and use it for improved Kernel allocation latencies.
- Enabled several of TCP Algo for those who wanted to switch to other TCP algo.
- Merged in performance improvement F2FS patches from other qualcomm devices [Huawei, OPPO, etc, etc].
- Change it to timer tick rate to 50 HZ [previous zeus kernel was 100hz (stock is 250hz)] 50 Hz is the lowest non-problematic tick rate which theoretically it should provide the best power efficiency at the cost of mildly performance penalty, hence we are still below than 16ms which is where render frames gets signaled so this value should be safe to use. While 100hz presents just merely around 10ms resolution, 50hz
presents around 15ms resolution. This should be giving fairness and balance between throughput and latency while reducing unnecessary energy consumption and avoiding reduced performance on CPU cores due to too many timer interrupts occurring across all cores. - Offload residual 1Hz scheduler tick When the CPU runs in full dynticks mode, so a 1Hz tick remains in order to keep the scheduler stats alive under full dyntick mode.
- Prevent or don't allow userspace to impose restrictions on CPU idle levels which allows the kernel to have the freedom to choose the proper CPUIdle levels as it sees fit.
- Don't disable cpuidle when entering suspend Leaving cpuidle enabled can result in improved power consumption.
- Applied some upstreams to vmpressure driver according to latest Google sources updates.
- Upstreamed ZRAM and added a configuration that can change the compression algo method for more customizable options.
- Upstreamed z3fold, zsmalloc, zbud, zpooling mechanism to latest available patches.
- Introduced uCLAMP scheduler to limit any tasks from consuming CPU bandwidth and integrated with schedutil cpu frequency selections.
- Rebuild PELT parameters from scratch and regenerated to be using 10ms instead of 32 ms or 16ms.
- Used most of ktweaks values and hardcoded and applied/used on this kernel by default.
- Killed userspace frameworks from touching or boosting CPU frequencies since now we have kernel based boosting drivers.
- Upstreamed CPUIdle drivers and Power management drivers furthermore with related fixes and enhancement.
- Regenerate outdated PELT values configuration for other settings By using latest available tool by Compiling PELT C program.
- Fixed Audio stutters from happening due to scheduler trying to preserve power consumption on certain scenarios on wrong timing.
- Applied some of UFS storage functions from newer Samsung devices for improved performance.
- Introduced Real-time priority to use for RCU worker threads This function specifies the SCHED_FIFO priority value that will be assigned to the rcuc/n and rcub/n threads.
- Sync schedutil to latest patches from Samsung Taken from Note 10 5G & S10 [Exynos 9825/9820] and fully merged with KAIR feature as they quote "AI based Resource Control".
- Adapted most of the EMS stune control functions along with boosting for improved responsiveness.
- Boost CPU and DDR bus slightly during background compaction to avoid visible jitters from happening.
- CPU Input Booster added the ability to customize minimum freq, maximum freq, idle freq, active minimum freq, for example it can be customized according to your liking [what idle frequency should it use, what minimum frequency it can use during active sessions, etc]
- CPU Bus boosting are tuned for optimal power efficiency and performance.
- Added Fsync toggle for those users who likes increased performance of IO but with increased risk of data loss.
- Improve node tampering protection on Dynamic SchedTune/Cpuset Assist functions.
- Added a gcc plugin to structleak for more stack initialization this plugin detects any structures that contain __user attributes and
makes sure it is being fully initialized so that a specific class of information exposure is eliminated. - GCC flags optimizations applied and used on top of it for fastest kernel code.
- Introduce CGROUP V2 freezer This implements freezer for cgroup v2, it tries to put tasks into a state similar to jobctl
stop. This means that tasks can be killed, ptraced (using PTRACE_SEIZE*), and interrupted. - Make irq affinity function to have cpu isolation aware functionality which helps to manage affinity of IRQ across all cores.
- Avoid to dynamically allocate memory on many of functions and drivers to avoid the overhead of dynamic memory allocation.
- Upstreamed sbitmap and bitmap libs to 4.19/5.0k+ commits and patches.
- Moved most of the unwanted or less important drivers to be active or bind to little cores.
- Moved most of the important drivers to be active or bind to big cores.
- Upstreamed and applied patches related to IRQ functions for improved kernel functionality.
- Migrated almost all drivers to use power efficient workqueues ...
Stable ZeusKernel Android OneUI2.1 for Note9
This the stable release for Android OneUI 2.1 ROM
Kernel Changes on OneUI Compared to latest ones are:-
- Updated GCC11 toolchain kernel compilation to latest updates available along with all companion libs with latest updates available
- Tuned CPU frequency scaling and throttling mechanism for smoother operation under throttling scenarios
- Tuned MIF and INT frequency scaling and adapted to CPU Load and frequencies usage
- Fixed Live Focus Rear Camera Mode due to updated strings routines and adapted to new commits
- Fixed Alot of random reboots and bugs related to kernel operations
- Improved SimpleLMK mechanisms and tuned it for maximum RAM usage [Free RAM=Wasted RAM]
- Fixed booting up issues with 512GB/8GB Note 9 models
- Timer, Locking, Clocksource, Timekeeping, CPU time, Futex, hrtimers drivers are upstreamed up to k4.19 patches and backported to k4.9
- Upstreamed massively RCU, SRCU to mainline kernels (which means up to k5.9 patches and updates)
- Introduced RCU-tasks from k5.4 and backported to k4.9
- Upstreamed Crypto engines and use all kind of crypto accelerations
- Added Simple display state API for detecting display screen off/on scenarios
- Removed/Silenced alot of tracings and loggings that is pretty much no benefits from it except hurting performance
- Now Exynos Media driver supports MFCv13.0 rather than MFCv12.0 which support HEVC 422 10, VP9 version3 profile
- Preparation on the kernel to add H.264 video enc/dec-coding for level 5.2 on the next kernel release [on stock it is 5.1]
- Fixed a small bug on media jsqz driver that could lead to a couple chains of issues generally
- Removed VLA from all over the kernel drivers like [camera,crypto engines, etc...]
- Introduced EAS scheduler mechanism and adapted with Samsung's EMS scheduler
- Upstreamed Memory Management of vmalloc, OOM to k5.4 and backported to k4.9
- Introduced refcount mechanism API and use it along with all its updates and patches
- Upstreamed stop_machine functions and scheduler wait mechanisms to k4.19 patches and updates
- Upstreamed scheduler timings to latest updates from k.4.19
- Introduced C.I.B. [Cpu Input Boost] drivers and enabled it and use it along with updates and patches related to it
- Introduced Dynamic SchedTune Boost drivers and enabled it and use it along with updates and patches related to it
- Introduced SchedTune Assist code and enabled it and use it along with updates and patches related to it
- Updated DevFreq boostings drivers mechanism and adapted it with general usage all over the kernel functions
- Upstreamed ext4 fs and f2fs fs with i_version API along with latest patches and updates [improve FS operations massively]
- Fixed HPA [High Page Allocator] driver and upstreamed from k4.14 taken from newer Samsung devices
Stable ZeusKernel Android OneUI2.1 for Note9
This the stable release for Android OneUI 2.1 ROM
Kernel Changes on OneUI Compared to latest ones are:-
- EMS [Exynos Mobile Scheduler] with upstreamed changes taken from Note 10/S10
- Added Triple cores frequency which will help improve power consumption and performance
- Implemented thermal table of Triple cores frequency for more balanced throttling mechanism
- Tuned frequencies for balanced performance and battery life
- More wakelock controls on battery/GPS/Sensors
- Upstreamed and Applied HPA [High Page Allocation] for proper page managements
- SimpleLMK is used and updated!
- Removed conventional LMK from the kernel and PSI is being used along with SimpleLMK
- Upstreamed Network drivers and Implemented TCP BBRv2!
- Upstreamed QOS [Quality Of Service] and Implemented CAKE [Common Applications Kept Enhanced]
- Jump Label is used to make kernel code faster
- SPF [Speculative Page Faults] which promises for the app launch time, It improves about 15% average. For the apps which have hundreds of threads, it will be about 20%.
- Fixed little cores can't stay at 2Ghz under load but it will go to 1.95Ghz so prevent little cores getting forced to 1950mhz under load
- CPU Freq Table now are little cores:- 202Mhz to 2GHz, big cores: 598Mhz to 2.9GHz (~2.88Ghz)
- Mali GPU is Oc'ed to 598Mhz
- Tuned MIF table frequency selection for faster responsiveness to load and user interaction
- Enable GPU Controls & GPU Voltage Control
- Disable the migration of timers among CPUs to prevent increases realtime latencies and scheduling interrupts.
- Disabled Audit Selinux as it affects performance under all circumstances. It's also dirty.
- Using latest GCC Toolchain available GCC11 with latest companions updates applied on top.
- Upstreamed Binder drivers up to 4.19k patches
- Kernel is compiled with LTO [Link Time Optimizations] which makes kernel code faster and optimized
- F2FS is upstreamed to upstream-f2fs-stable-linux-4.9.y branch with latest updates applied [/data only supported]
- Kernel is cleaned up deeply and kernel size decreased significantly
- Removed loggings from EXT4 and F2FS file systems
- Reserved RAM is now much lower which mean more free ram to use!
- Implement crypto xxhash which is extremely fast, working at speeds close to RAM limits
- Optimized string routines for AArch64 which improves performance generally
- Updated SDCard drivers and Wifi drivers to latest available from Note 10/S10 devices
- Brought from Note 10 and S10 post processing drivers, MFC , scaler drivers and applied to Note 9 kernel ... should help getting better generally on images or videos processing
- Fixes on wakelock blocker for correct operations
- DevFreq boost driver applied and used
- Wifi drivers is cleaned up and improved
- Knox Samsung crap removed completely
- Modem driver cleaned out completely
- Reserved RAM is reduced to 400mb instead of 550mb [Might be small difference on RAM between 8GB Models and 6GB Models]
- Sound drivers clean out
- UFS Exynos cleaned out
- Oximeter/Pulse sensors cleaned out
- Using latest Kernel sources
FDE.AI is fully supported and working on Zeus Kernel with more benefits and I will never block any of optimization tools as they do provide improved potential performance and more battery life out of not just zeus but also any kernel who appreciate those tools ... those kernel developers who blocks those tools without any reasons or evidence are the ones who wants to take any optimization tools down along with any other who supports them and hence Zeus Kernel supports FDE.AI/L Speed and others fully so Zeus Kernel are under fire from those gangs so don't get misled by them or believe there false information against Zeus kernels, Thank you.