S666LN: init: Tune F2FS and dirty writeout policy for modern devices

In a previous commit bb0838b5114419b4f8ecff67c0b6fb728399c7b7, the gc_urgent_sleep_time for F2FS was aggressively set to 50ms to optimize GC.
This change, however, led to performance regressions on most devices, particularly of those running in 4.19+ kernels.
From our tests, the heightened CPU and I/O activity from this aggressive garbage collection setting is the likely cause.
To address this, we're revising the gc_urgent_sleep_time parameter to strike a balance between aggressive GC and device performance, taking
bb0838b5114419b4f8ecff67c0b6fb728399c7b7 goal into consideration.
Furthermore, the dirty writeout policy has been aligned with the latest configurations used in Pixel devices,
and cp_interval has been adjusted to surpass dirty_expire_centisecs for improved power efficiency during idle times.

[ChrisCatto]: Do not set dirty_background_ratio to 10 because that is the default value for us anyways.

Test: booted partner device, monitor performance
Change-Id: Ie4d0c870d734e915aaebcc53e64acdabac47b6dc
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: KimelaZX <mmikailrei@gmail.com>
This commit is contained in:
minaripenguin
2025-12-11 06:34:55 +07:00
committed by KimelaZX
parent 99e0e2160c
commit 8487da900e

View File

@@ -71,6 +71,8 @@ on post-fs-data
write /sys/block/sdb/queue/iostats 0
write /sys/block/sdc/queue/iostats 0
write /sys/block/sdc/queue/nr_requests 256
write /dev/sys/fs/by-name/userdata/cp_interval 6000
write /dev/sys/fs/by-name/userdata/gc_urgent_sleep_time 200
on boot
# boot perf. tune