Lower gc_urgent_sleeptime to 50
This will substantially speed up GC progress
Test: Run /vendor/bin/checkpoint_gc
Bug: 133822599
Change-Id: Ic1f064437381bce99d62dfd146088d43e08b1766
diff --git a/checkpoint_gc/checkpoint_gc.sh b/checkpoint_gc/checkpoint_gc.sh
index d653ee5..682c849 100644
--- a/checkpoint_gc/checkpoint_gc.sh
+++ b/checkpoint_gc/checkpoint_gc.sh
@@ -39,6 +39,8 @@
exit 0
fi
log -pi -t checkpoint_gc Turning on GC for ${NAME}
+read OLD_SLEEP < /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time || exit 1
+echo 50 > /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time || exit 1
echo 1 > /sys/fs/f2fs/${NAME}/gc_urgent || exit 1
read DIRTY_SEGMENTS_START < /sys/fs/f2fs/${NAME}/dirty_segments
@@ -63,6 +65,7 @@
log -pi -t checkpoint_gc Turning off GC for ${NAME}
echo 0 > /sys/fs/f2fs/${NAME}/gc_urgent
+echo ${OLD_SLEEP} > /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time
sync
print -u${STATUS_FD} "global_progress 1.0"