Hi, [Qemu is evoked starting in paragraph 3] I am interested in increasing the ease of debugging/reproducibility/validity of network simulations. Discrete time simulations is the solution that appeals the most to me because then the final results of the simulation don't depend on the CPU anymore; another slower computer should reach the same results as your fast computer. The "perfect" reproducibility aspect makes debuging a lot easier in my experience too (Especially true for kernel stacks); indeed rerunning a simulation will exert the same code paths.
I've been using with some success [DCE] (Direct Code Execution) which allows to run real applications (iperf/vlc) over the linux kernel compiled as a library (aka "libOS" see https://lwn.net/Articles/637658/). The network between the kernels is simulated by [ns-3] (the discrete time Network Simulator 3). Overall using DCE allows me to reach every previously mentioned point; every scenario is perfectly reproducible which proved invaluable when I worked on linux kernel aspects. I believe its results are also quite credible in some scenarii (https://hal.inria.fr/hal-00880870/file/con013-hal.pdf). DCE looks pretty good except it's really a nightmare to maintain. It partially reimplements glibc so that real applications can run on top of ns3 (through a hackish gcc extension that breaks clang and gcc old linker) and the interface to replace the ns3 TCP model with the linux stack is also hard to maintain. Thus I've been looking at running Qemu in discrete time and interface it with ns3 (since both are FOSS I am familiar with). - VMSimint does nearly that, it runs Qemu in discrete time but interface it with a JAVA simulator http://www.ikr.uni-stuttgart.de/Content/Publications/Archive/We_SIMUTools_2014_40209.pdf (with the code http://www.ikr.uni-stuttgart.de/Content/IKRSimLib/Download/) - http://web.ornl.gov/~nutarojj/adevs/ does sthg similar too My questions would be: 1/ do you know of any other related work ? 2/ I believe there is interest from the research side but would it be possible to merge either approach or a similar one (adevs patch doesn't seem too big ~500 lines), would that be of interest for the Qemu comminity too ? 3/ if yes to 2. How to proceed, which one would be favorite ? if no, what should be improved ? or would that be a definitive no ? Best regards Matt [ns3] https://www.nsnam.org/ns-3-27/ [DCE] https://www.nsnam.org/overview/projects/direct-code-execution/ more details in https://hal.inria.fr/hal-00880870/file/con013-hal.pdf