summaryrefslogtreecommitdiffstats
path: root/scripts
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:50 +0100
commitf19f252e2bad84524d61a743effac9e43e64c4e2 (patch)
tree10cf1c65d45ae0671d1391fc56d0f0abf7ac7b42 /scripts
parent0486b342feb71256bef2419ea8158d07a9d1d1bb (diff)
downloadpoky-f19f252e2bad84524d61a743effac9e43e64c4e2.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". (From OE-Core rev: 141a3c9ce93bc3d526303021ecf0460c6e9fea8a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index c71f3c4df5..e62d869c20 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1519,6 +1519,11 @@ def main():
1519 try: 1519 try:
1520 config = BaseConfig() 1520 config = BaseConfig()
1521 1521
1522 renice = os.path.expanduser("~/bin/runqemu-renice")
1523 if os.path.exists(renice):
1524 logger.info('Using %s to renice' % renice)
1525 subprocess.check_call([renice, str(os.getpid())])
1526
1522 def sigterm_handler(signum, frame): 1527 def sigterm_handler(signum, frame):
1523 logger.info("SIGTERM received") 1528 logger.info("SIGTERM received")
1524 os.kill(config.qemupid, signal.SIGTERM) 1529 os.kill(config.qemupid, signal.SIGTERM)