Introduce target dirty segment ratio tunable parameter

We introduce a new parameter of target dirty segment ratio,
which can be used to set a target dirty / (dirty + free) segments
ratio. For example, if we set this as 80%, GC sleep time will be
calculated to achieve this ratio in a GC period.

Bug: 241601436
Test: check smart idle maint log of StorageManagerService
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I73f2bcf4bdb810164c174bd0d2518b15d577d5d5
Merged-In: I73f2bcf4bdb810164c174bd0d2518b15d577d5d5
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 40186ef..5e838f6 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -495,12 +495,13 @@
 binder::Status VoldNativeService::setGCUrgentPace(int32_t neededSegments,
                                                   int32_t minSegmentThreshold,
                                                   float dirtyReclaimRate, float reclaimWeight,
-                                                  int32_t gcPeriod, int32_t minGCSleepTime) {
+                                                  int32_t gcPeriod, int32_t minGCSleepTime,
+                                                  int32_t targetDirtyRatio) {
     ENFORCE_SYSTEM_OR_ROOT;
     ACQUIRE_LOCK;
 
     SetGCUrgentPace(neededSegments, minSegmentThreshold, dirtyReclaimRate, reclaimWeight, gcPeriod,
-                    minGCSleepTime);
+                    minGCSleepTime, targetDirtyRatio);
     return Ok();
 }