Skip to contentSkip to conversation

init : Reduce rootwait polling interval time to 5ms

PATCH Applied Jungseung Lee 2 participants 2 messages Dec 7, 2016 1 message not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20161207060804eucas1p11b55de7e87a1dbc684c274b31fc4536c@eucas1p1.samsung.com

#1 lore raw

PATCH 1/1 init : Reduce rootwait polling interval time to 5ms

For several devices, the rootwait time is sensitive because it directly affects booting time.
The polling interval of rootwait is currently 100ms.
To save unnessesary waiting time, reduce the polling interval to 5 ms.

---
 init/do_mounts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
init/do_mounts.c +3 -1
index dea5de9..b523820 100644
@@ -543,6 +543,8 @@ void __init mount_root(void)
 #endif
 }
 
+#define ROOTWAIT_MSEC 5
+
 /*
  * Prepare the namespace - decide what/where to mount, load ramdisks, etc.
  */
@@ -588,7 +590,7 @@ void __init prepare_namespace(void)
 			saved_root_name);
 		while (driver_probe_done() != 0 ||
 			(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
-			msleep(100);
+			msleep(ROOTWAIT_MSEC);
 		async_synchronize_full();
 	}
 
Signature · 1 line
2.10.1
#2 lore raw
Quoted 19 lines · On Wed, 07 Dec 2016 15:07:43 +0900 Jungseung Lee <[email protected]> wrote:

For several devices, the rootwait time is sensitive because it directly affects booting time.
The polling interval of rootwait is currently 100ms.
To save unnessesary waiting time, reduce the polling interval to 5 ms.

...

init/do_mounts.c +2 -0
@@ -543,6 +543,8 @@ void __init mount_root(void)
 #endif
 }
 
+#define ROOTWAIT_MSEC 5
+
 /*
  * Prepare the namespace - decide what/where to mount, load ramdisks, etc.
  */

init/do_mounts.c void __init prepare_namespace(void) · line 595

Quoted 7 lines
init/do_mounts.c +1 -1
@@ -588,7 +590,7 @@ void __init prepare_namespace(void)
 			saved_root_name);
 		while (driver_probe_done() != 0 ||
 			(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
-			msleep(100);
+			msleep(ROOTWAIT_MSEC);
 		async_synchronize_full();
 	}

Fair enough. But I don't think the used-once #define adds any value, so let's go with the simple version?

init/do_mounts.c renamed from init/do_mounts.c~init-reduce-rootwait-polling-interval-time-to-5ms-fix +1 -3
@@ -543,8 +543,6 @@ void __init mount_root(void)
 #endif
 }
 
-#define ROOTWAIT_MSEC 5
-
 /*
  * Prepare the namespace - decide what/where to mount, load ramdisks, etc.
  */
@@ -590,7 +588,7 @@ void __init prepare_namespace(void)
 			saved_root_name);
 		while (driver_probe_done() != 0 ||
 			(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
-			msleep(ROOTWAIT_MSEC);
+			msleep(5);
 		async_synchronize_full();
 	}
 

_