tuned/tuned-2.3.0-fix-race.patch
Jaroslav Škarvada 1b9485026a fixed race condition in the start/stop code
resolves: rhbz#1028119
- improved tuned responsiveness
  resolves: rhbz#1028122
2013-11-13 23:17:59 +01:00

21 lines
664 B
Diff

diff --git a/tuned/daemon/daemon.py b/tuned/daemon/daemon.py
index 9741cac..804ac0b 100644
--- a/tuned/daemon/daemon.py
+++ b/tuned/daemon/daemon.py
@@ -65,7 +65,6 @@ class Daemon(object):
self._save_active_profile(self._profile.name)
self._unit_manager.start_tuning()
- self._terminate.clear()
while not tuned.utils.commands.wait(self._terminate, self._update_interval):
log.debug("updating monitors")
self._unit_manager.update_monitors()
@@ -105,6 +104,7 @@ class Daemon(object):
log.info("starting tuning")
self._thread = threading.Thread(target=self._thread_code)
+ self._terminate.clear()
self._thread.start()
return True