[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix high CPU usage when the output module unexpectedly
From: |
chrys87 |
Subject: |
[PATCH] Fix high CPU usage when the output module unexpectedly |
Date: |
Wed, 25 Sep 2013 17:00:50 +0200 |
Hi List,
This patch works as descriped.
>>Speech-dispatcher can consume most of cpu resources if the output module
>>stops.
>>
>>For example, this issue can be observed on fedora 19 with speech dispatcher
>>0.8, when the user logins from a gdm with screen reader on.
>>Then, the output modules used by gdm are stopped which is followed by a high
>>cpu usage.
>>
>>---
>> src/server/speaking.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>>diff --git a/src/server/speaking.c b/src/server/speaking.c
>>index ee8c4d4..e9f745c 100644
>>--- a/src/server/speaking.c
>>+++ b/src/server/speaking.c
>>@@ -98,7 +98,10 @@ void *speak(void *data)
>> }
>> if (poll_count > 1) {
>> if ((revents = poll_fds[1].revents)) {
>>- if ((revents & POLLIN) || (revents & POLLPRI)) {
>>+ if (revents & POLLHUP) {
>>+ FATAL
>>+ ("wait_for_poll: output_module
>>disconnected");
>>+ } else if ((revents & POLLIN) || (revents &
>>POLLPRI)) {
>> MSG(5,
>> "wait_for_poll: activity on
>> output_module");
>> /* Check if sb is speaking or they are
>> all silent.
>>--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Fix high CPU usage when the output module unexpectedly,
chrys87 <=