summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 15:06:07 +0100
committerSteve Sakoman <steve@sakoman.com>2020-09-08 04:31:19 -1000
commit829443b3fafa000e330c06ebb144641bd2d20ad1 (patch)
treec1069ae158db57aa810217ab73adabc5d18e3169
parent32902a2763a7557d52bf27f3717b8f9b27275284 (diff)
downloadopenembedded-core-829443b3fafa000e330c06ebb144641bd2d20ad1.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> (cherry picked from commit 141a3c9ce93bc3d526303021ecf0460c6e9fea8a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rwxr-xr-xscripts/runqemu5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index b24ac1c804..cc87ea871a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1507,6 +1507,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)