OSDN Git Service

Improve boot time by 0.1s by reducing a polling sleep interval
authorPaul Lawrence <paullawrence@google.com>
Thu, 11 Jun 2015 18:15:29 +0000 (11:15 -0700)
committerPaul Lawrence <paullawrence@google.com>
Thu, 11 Jun 2015 18:36:18 +0000 (11:36 -0700)
Bug: 21516860
Change-Id: I9e28f4d9cc20ec2a7d9e325c02ef85f0ad9b3d60

cryptfs.c

index 355d591..ecfc3a6 100644 (file)
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -1413,7 +1413,7 @@ int wait_and_unmount(const char *mountpoint, bool kill)
     return rc;
 }
 
-#define DATA_PREP_TIMEOUT 200
+#define DATA_PREP_TIMEOUT 1000
 static int prep_data_fs(void)
 {
     int i;
@@ -1431,7 +1431,7 @@ static int prep_data_fs(void)
         if (*p == '1') {
             break;
         } else {
-            usleep(250000);
+            usleep(50000);
         }
     }
     if (i == DATA_PREP_TIMEOUT) {