Skip to content

Commit

Permalink
update osv and unikraft boot time experiments
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo Lefeuvre <hugo.lefeuvre@manchester.ac.uk>
  • Loading branch information
hlef committed Jan 13, 2021
1 parent a1f2513 commit e3238b3
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
3 changes: 1 addition & 2 deletions examples/osv-boottime/osv-boottime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ runs:

# QEMU statistics using instrumented VMM
echo "QEMU statistics: " > /results.txt
script -c '/root/osv/scripts/run.py --qemu-path \
../qemu/build/x86_64-softmmu/qemu-system-x86_64' -f /tmp/out
script -c '../qemu/build/x86_64-softmmu/qemu-system-x86_64 -m 40M -device virtio-blk-pci,id=blk0,drive=hd0,scsi=off,bootindex=0 -drive file=/root/osv/build/last/usr.img,if=none,id=hd0,cache=none,aio=native -net none -enable-kvm -cpu host,+x2apic -chardev stdio,mux=on,id=stdio,signal=off -mon chardev=stdio,mode=readline -device isa-serial,chardev=stdio' -f /tmp/out
cat /tmp/out | grep "startup" >> /results.txt

# Create Firecracker FIFOs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
diff --git a/Makefile b/Makefile
index 5426bae..5f3cc4f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
UK_ROOT ?= $(PWD)/../../unikraft
UK_LIBS ?= $(PWD)/../../libs
-LIBS :=
+LIBS := $(PWD)/../../plats/plat-solo5

all:
@$(MAKE) -C $(UK_ROOT) A=$(PWD) L=$(LIBS)
diff --git a/main.c b/main.c
index 0a14cb0..6c0b899 100644
--- a/main.c
Expand Down
15 changes: 15 additions & 0 deletions examples/unikraft-boottime/solo5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/Makefile.uk b/Makefile.uk
index b4edae6..364dd7f 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -11,8 +11,8 @@ $(eval $(call addplatlib,solo5,libsolo5plat))
##
## Solo5 Sources
##
-SOLO5_VERSION=0.4.1
-SOLO5_URL=https://github.com/Solo5/solo5/archive/v$(SOLO5_VERSION).zip
+SOLO5_VERSION=0.4.1-instvmm
+SOLO5_URL=https://github.com/hlef/solo5/archive/v$(SOLO5_VERSION).zip
$(eval $(call fetch,libsolo5,$(SOLO5_URL)))

##
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ prams:
inputs:
- source: hello.patch
destination: /root/hello.patch
- source: solo5.patch
destination: /root/solo5.patch
- source: /etc/resolv.conf
destination: /etc/resolv.conf
- source: /etc/environment
Expand All @@ -32,13 +34,33 @@ runs:

touch /results.txt

# patch helloworld application
cd /root/.unikraft/app/helloworld
git apply --ignore-space-change /root/hello.patch

# patch solo5 platform
kraft list pull plat/solo5
cd ../../plats/plat-solo5/
git checkout 51213c68c03208b547bfc23d02022de87cbbb696
git apply /root/solo5.patch
cd ../../apps/helloworld

# enable solo5 platform
echo "CONFIG_PLAT_SOLO5=y" >> .config
echo "CONFIG_SOLO5_HVT_TENDER=y" >> .config

# build both KVM and solo5
make

# QEMU statistics using instrumented VMM
echo "QEMU statistics: " > /results.txt
script -c 'qemu-system-x86_64 -enable-kvm -nographic -nodefaults \
-no-reboot -no-user-config -m 2M -kernel \
build/helloworld_kvm-x86_64 \
-cpu host,migratable=no,+invtsc' -f /tmp/out
cat /tmp/out | grep "startup" >> /results.txt

# solo5 statistics using instrumented VMM
echo "solo5 statistics: " >> /results.txt
script -c './build/solo5-hvt ./build/helloworld_solo5-x86_64' -f /tmp/out
cat /tmp/out | grep "startup" >> /results.txt

0 comments on commit e3238b3

Please sign in to comment.