mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 12:49:34 +02:00
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>
This commit is contained in:
@@ -1519,6 +1519,11 @@ def main():
|
|||||||
try:
|
try:
|
||||||
config = BaseConfig()
|
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):
|
def sigterm_handler(signum, frame):
|
||||||
logger.info("SIGTERM received")
|
logger.info("SIGTERM received")
|
||||||
os.kill(config.qemupid, signal.SIGTERM)
|
os.kill(config.qemupid, signal.SIGTERM)
|
||||||
|
|||||||
Reference in New Issue
Block a user