[M108 Migration][VD] Call PS_Mount_Fast api instead of PS_Mount api 79/289379/1
authorSugyum Kim <su.g.kim@samsung.com>
Thu, 13 Oct 2022 05:45:26 +0000 (14:45 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Tue, 7 Mar 2023 00:48:12 +0000 (00:48 +0000)
PS_Mount_Fast api newly introduced in Tizen 7.0 to improve
mount performance by security team.

Existing PS_Mount API used fork-exec method,
but PS_Mount_Fast API calls mount system function.

There is a performance improvement of about 900ms,
and with this new API, it takes about 500ms at the time of cold boot.

Reference:
https://review.tizen.org/gerrit/282899/

Change-Id: I87680117715cc972019f9ead4cc1e7055f2a6723
Signed-off-by: Sugyum Kim <su.g.kim@samsung.com>
(cherry picked from commit 0298504f5fa3bffba9d327993d06a276c875f6cf)

tizen_src/downloadable/chromium_efl_install.cc

index d9ccbef..2359a1b 100644 (file)
@@ -17,6 +17,8 @@
 #include <iostream>
 #include <string>
 
+#include "chromium_impl/build/tizen_version.h"
+
 #define FILE_LOG_OUT
 #include "dlog_util.h"
 
@@ -128,8 +130,13 @@ static int mount(bool mount, const char* args, bool use_system = false) {
   int rv = SUCCESS;
   int result = SUCCESS;
 
-  if (mount)
+  if (mount) {
+#if TIZEN_VERSION_AT_LEAST(7, 0, 0)
+    rv = PS_Mount_Fast(args, strlen(args) + 1, 1, &result);
+#else
     rv = PS_Mount(args, strlen(args) + 1, 1, &result);
+#endif
+  }
   else
     rv = PS_Umount(args, strlen(args) + 1, 1, &result);
   LOG(INFO) << "result = " << rv << ", " << result;