summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 15:06:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-06 09:58:15 +0100
commit141a3c9ce93bc3d526303021ecf0460c6e9fea8a (patch)
tree9a9c3c2eb41b0548a3a2a9a25ea0564a91f8601f /scripts/runqemu
parent4b284d2728c50d698cd61e026ad5fdb8eeb94b9c (diff)
downloadopenembedded-core-contrib-141a3c9ce93bc3d526303021ecf0460c6e9fea8a.tar.gz
runqemu: Add a hook to allow it to renice
We have an issue where qemu is being starved of resources on our autobuilders. We can't raise its priority without special capacilties, therefore add a hook which if present can allow this to happen using an executable "~/runqemu-renice". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index c71f3c4df57..e62d869c20c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1519,6 +1519,11 @@ def main():
try:
config = BaseConfig()
+ renice = os.path.expanduser("~/bin/runqemu-renice")
+ if os.path.exists(renice):
+ logger.info('Using %s to renice' % renice)
+ subprocess.check_call([renice, str(os.getpid())])
+
def sigterm_handler(signum, frame):
logger.info("SIGTERM received")
os.kill(config.qemupid, signal.SIGTERM)