From 34d984d147340008e2d4e43da055de8b00287e07 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 12 Jun 2023 12:15:31 -0700 Subject: [PATCH] util: Update GitHub Runners Vagrant to overcommit memory SE mode tests were failing in some cases where the VM did not have enough memory to satisfy the constraints of the simulated system. This change ensures the VM allows overcommitting of memory. Change-Id: I1800288e16146bdae612a401c2ff282d8664892d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71498 Reviewed-by: Jason Lowe-Power Tested-by: kokoro Maintainer: Jason Lowe-Power --- util/github-runners-vagrant/Vagrantfile-builder | 5 +++++ util/github-runners-vagrant/Vagrantfile-runner | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/util/github-runners-vagrant/Vagrantfile-builder b/util/github-runners-vagrant/Vagrantfile-builder index 242e094d19..cd36e7894c 100644 --- a/util/github-runners-vagrant/Vagrantfile-builder +++ b/util/github-runners-vagrant/Vagrantfile-builder @@ -22,6 +22,11 @@ Vagrant.configure("2") do |config| config.vm.provision :shell, privileged: false, path: "provision_nonroot.sh" # The provision_root.sh adds the vagrant user to the docker group, so we need to reload the VM. config.vm.provision :reload + config.vm.provision :shell, run: 'always', inline: <<-SHELL + # When running gem5 in SE mode we must overcommit memory. + # This is run on every startup of the VM. + /sbin/sysctl vm.overcommit_memory=1 + SHELL config.vm.provision :shell, privileged: false, run: 'always', inline: <<-SHELL if [ -d ~/actions-runner ]; then # This will be run everytime the VM is run (once created). diff --git a/util/github-runners-vagrant/Vagrantfile-runner b/util/github-runners-vagrant/Vagrantfile-runner index ab601cd9c8..854e5f58b1 100644 --- a/util/github-runners-vagrant/Vagrantfile-runner +++ b/util/github-runners-vagrant/Vagrantfile-runner @@ -22,6 +22,11 @@ Vagrant.configure("2") do |config| config.vm.provision :shell, privileged: false, path: "provision_nonroot.sh" # The provision_root.sh adds the vagrant user to the docker group, so we need to reload the VM. config.vm.provision :reload + config.vm.provision :shell, run: 'always', inline: <<-SHELL + # When running gem5 in SE mode we must overcommit memory. + # This is run on every startup of the VM. + /sbin/sysctl vm.overcommit_memory=1 + SHELL config.vm.provision :shell, privileged: false, run: 'always', inline: <<-SHELL if [ -d ~/actions-runner ]; then # This will be run everytime the VM is run (once created).