[OE-core] [PATCH 1/2] oeqa/utils/qemurunner.py: Fix HIGH CPU usage on LoggingThread
Aníbal Limón
anibal.limon at linux.intel.com
Tue Sep 22 16:56:22 UTC 2015
LoggingThread is used for receive console output from QEMU
over TCP, so add filter to only wake poll on read events,
also change the event mask variable name to be more descriptive.
This fixes HIGH CPU consume caused by wake on ready to write
events.
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
meta/lib/oeqa/utils/qemurunner.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index d32c9db..6edd374 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -440,9 +440,9 @@ class LoggingThread(threading.Thread):
def eventloop(self):
poll = select.poll()
- eventmask = self.errorevents | self.readevents
+ event_read_mask = self.errorevents | self.readevents
poll.register(self.serversock.fileno())
- poll.register(self.readpipe, eventmask)
+ poll.register(self.readpipe, event_read_mask)
breakout = False
self.running = True
@@ -466,7 +466,7 @@ class LoggingThread(threading.Thread):
self.readsock, _ = self.serversock.accept()
self.readsock.setblocking(0)
poll.unregister(self.serversock.fileno())
- poll.register(self.readsock.fileno())
+ poll.register(self.readsock.fileno(), event_read_mask)
self.logger.info("Setting connection established event")
self.connection_established.set()
--
1.9.1
More information about the Openembedded-core
mailing list