From: Richard Purdie Date: Sat, 5 Sep 2020 14:06:07 +0000 (+0100) Subject: runqemu: Add a hook to allow it to renice X-Git-Tag: 2020-10-gatesgarth~279 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=141a3c9ce93bc3d526303021ecf0460c6e9fea8a;p=openembedded-core.git 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 --- 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)