1. 20 Jan, 2014 2 commits
  2. 13 Jan, 2014 4 commits
  3. 09 Jan, 2014 1 commit
  4. 20 Dec, 2013 3 commits
  5. 16 Dec, 2013 7 commits
  6. 13 Dec, 2013 2 commits
  7. 12 Dec, 2013 3 commits
  8. 11 Dec, 2013 6 commits
  9. 09 Dec, 2013 2 commits
  10. 05 Dec, 2013 4 commits
  11. 04 Dec, 2013 2 commits
  12. 03 Dec, 2013 1 commit
  13. 02 Dec, 2013 2 commits
  14. 29 Nov, 2013 1 commit
    • Guido Trotter's avatar
      SingleNotifyPipeCondition: don't share pollers · 546c5100
      Guido Trotter authored
      As widely known Ganeti uses a better[1] lock condition notification
      library based on operating system pipes.
      
      Inside this library we were using a shared poller for all threads
      waiting for a condition. While poller is not thread safe, since (1)
      we're holding the condition lock while calling poll and while parsing
      results, and (2) we don't reuse the poller between different conditions,
      or with newer fds our usage *is* actually safe. Unfortunately newer
      versions of python take a hand-holding approach and don't trust us to do
      the right thing. As such we are forced to create a new poller each time
      we call wait.
      
      This costs one system call more per wait, but practical measurements
      have shown no significant impact on Ganeti. This is also a temporary
      measures as newer versions will get away with the threading altogether
      and move job schedulers to luxid.
      
      The patch is losely based on a patch submitted by Daniel Néri, but has
      been modified to reduce even further the scope of the poller variable to
      just the waiter class.
      
      [1] because I say so.
      [1 bis] also because it produces fairer results, avoids possible
      starvation and eliminates busy-wait polling.
      [2] http://bugs.python.org/issue8865
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
      546c5100