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/IdleMaint.h b/IdleMaint.h
index e94f853..a28cde2 100644
--- a/IdleMaint.h
+++ b/IdleMaint.h
@@ -27,7 +27,8 @@
int AbortIdleMaint(const android::sp<android::os::IVoldTaskListener>& listener);
int32_t GetStorageLifeTime();
void SetGCUrgentPace(int32_t neededSegments, int32_t minSegmentThreshold, float dirtyReclaimRate,
- float reclaimWeight, int32_t gcPeriod, int32_t minGCSleepTime);
+ float reclaimWeight, int32_t gcPeriod, int32_t minGCSleepTime,
+ int32_t targetDirtyRatio);
void RefreshLatestWrite();
int32_t GetWriteAmount();