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
poky-f19f252e2bad84524d61a743effac9e43e64c4e2.tar.bz2
poky-f19f252e2bad84524d61a743effac9e43e64c4e2.zip
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():
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)