Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add live migration plugin in java.
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Dec 2017 00:35:19 +0000 (01:35 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Dec 2017 00:35:19 +0000 (01:35 +0100)
One test fails, well be checked later
update changelog

ChangeLog
examples/java/cloud/masterworker/Main.java
examples/java/cloud/migration/Main.java
src/bindings/java/jmsg.cpp
src/bindings/java/jmsg.hpp
src/bindings/java/org/simgrid/msg/Msg.java

index 83c32a9..b271e22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,16 @@ SimGrid (3.18) NOT RELEASED YET (target: December 24 2017)
  - LMM stuff moved to its own namespace: simgrid::kernel::lmm.
  - Renamed LMM classes (e.g. s_lmm_system_t -> System).
 
  - LMM stuff moved to its own namespace: simgrid::kernel::lmm.
  - Renamed LMM classes (e.g. s_lmm_system_t -> System).
 
+ Virtual Machines
+ - Live migration is getting moved to a plugin. Dirty page tracking is
+   the first part of this plugin. This imply that VM migration is now
+   only possible if one this function is called :
+    - C/MSG: MSG_vm_live_migration_plugin_init() 
+    - C/C++: sg_vm_live_migration_plugin_init()
+    - Java:  Msg.liveMigrationInit()
+   For C and C++, "simgrid/plugins/live_migration.h" also has to be 
+   included.
+
  XBT
  - Define class simgrid::xbt::Path to manage file names.
  - Removed unused functions:
  XBT
  - Define class simgrid::xbt::Path to manage file names.
  - Removed unused functions:
index 5623ffa..8406958 100644 (file)
@@ -22,6 +22,7 @@ class Main {
 
   public static void main(String[] args) {
     Msg.init(args); 
 
   public static void main(String[] args) {
     Msg.init(args); 
+    Msg.liveMigrationInit();
 
     String platfFile = "../../examples/platforms/small_platform.xml";
     if (args.length >= 1)
 
     String platfFile = "../../examples/platforms/small_platform.xml";
     if (args.length >= 1)
index b03c4b4..191b2a1 100644 (file)
@@ -26,7 +26,7 @@ public class Main {
 
   public static void main(String[] args) throws MsgException {
     Msg.init(args);
 
   public static void main(String[] args) throws MsgException {
     Msg.init(args);
-
+    Msg.liveMigrationInit();
     if (args.length < 1) {
       Msg.info("Usage  : Main platform_file.xml");
       System.exit(1);
     if (args.length < 1) {
       Msg.info("Usage  : Main platform_file.xml");
       System.exit(1);
index 44f5f5f..b821c47 100644 (file)
@@ -12,6 +12,7 @@
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/plugins/file_system.h"
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/plugins/file_system.h"
+#include "simgrid/plugins/live_migration.h"
 #include "simgrid/simix.h"
 
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/simix.h"
 
 #include "simgrid/s4u/Host.hpp"
@@ -241,6 +242,11 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
   sg_host_energy_plugin_init();
 }
 
   sg_host_energy_plugin_init();
 }
 
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_liveMigrationInit()
+{
+  sg_vm_live_migration_plugin_init();
+}
+
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit()
 {
   sg_storage_file_system_init();
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit()
 {
   sg_storage_file_system_init();
index e7d0919..e610735 100644 (file)
@@ -37,6 +37,7 @@ JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv* env, jclass
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_liveMigrationInit();
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit();
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass cls, jstring jargs);
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_fileSystemInit();
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass cls, jstring jargs);
index cc1cb7d..86a14b4 100644 (file)
@@ -41,6 +41,7 @@ public final class Msg {
        /** Tell the kernel that you want to use the energy plugin */
        public static final native void energyInit();
        public static final native void fileSystemInit();
        /** Tell the kernel that you want to use the energy plugin */
        public static final native void energyInit();
        public static final native void fileSystemInit();
+       public static final native void liveMigrationInit();
 
        /** Run the MSG simulation.
         *
 
        /** Run the MSG simulation.
         *