diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-09-22 11:56:22 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-22 18:13:02 +0100 |
commit | 7b6c9b6327638c9731cea80a52d30d4a8fb6e081 (patch) | |
tree | 0ffb8984df037f2872e3a0625438fe94ceab8cde | |
parent | 48cbde0ea77ed20126eceba5feb37c42a9229500 (diff) | |
download | openembedded-core-7b6c9b6327638c9731cea80a52d30d4a8fb6e081.tar.gz openembedded-core-7b6c9b6327638c9731cea80a52d30d4a8fb6e081.tar.bz2 openembedded-core-7b6c9b6327638c9731cea80a52d30d4a8fb6e081.zip |
oeqa/utils/qemurunner.py: Fix HIGH CPU usage on LoggingThread
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index d32c9db46d..6edd37477e 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() |