summaryrefslogtreecommitdiffstats
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-17 12:51:24 +0100
commit54ef7e87508a21d05f02538b41a108925ed6a121 (patch)
tree7e894939ed56da9f9871918d3c2cb7977731b3c6
parent52ede1bca772dcf4691c26edea863eb318488e67 (diff)
downloadpoky-54ef7e87508a21d05f02538b41a108925ed6a121.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: 829443b3fafa000e330c06ebb144641bd2d20ad1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 141a3c9ce93bc3d526303021ecf0460c6e9fea8a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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():
1507 try: 1507 try:
1508 config = BaseConfig() 1508 config = BaseConfig()
1509 1509
1510 renice = os.path.expanduser("~/bin/runqemu-renice")
1511 if os.path.exists(renice):
1512 logger.info('Using %s to renice' % renice)
1513 subprocess.check_call([renice, str(os.getpid())])
1514
1510 def sigterm_handler(signum, frame): 1515 def sigterm_handler(signum, frame):
1511 logger.info("SIGTERM received") 1516 logger.info("SIGTERM received")
1512 os.kill(config.qemupid, signal.SIGTERM) 1517 os.kill(config.qemupid, signal.SIGTERM)