1. 27 4月, 2012 1 次提交
  2. 07 4月, 2012 1 次提交
    • P
      main-loop: interrupt wait when data arrives on a socket · d3385eb4
      Paolo Bonzini 提交于
      Right now, the main loop is not interrupted when data arrives on a
      socket.  To fix this, register each socket to interrupt the main loop
      with WSAEventSelect.  This does not replace select, it only communicates
      a change in socket state that requires a select call.
      
      Since the interrupt fires only once per recv call, or only once
      after a send call returns EWOULDBLOCK we can activate it on all events
      unconditionally.  If QEMU is momentarily uninterested on some condition,
      the main loop will not busy wait.  Instead, it may get one extra wakeup,
      but then it will ignore the condition until progress occurs and/or
      qemu_set_fd_handler is called to set a callback.  At this point the
      condition will be tested via select and the callback will be invoked
      even if it is still disabled on the event.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      d3385eb4
  3. 02 2月, 2012 1 次提交
    • M
      main-loop: For tools, initialize timers as part of qemu_init_main_loop() · d34e8f6e
      Michael Roth 提交于
      In some cases initializing the alarm timers can lead to non-negligable
      overhead from programs that link against qemu-tool.o. At least,
      setting a max-resolution WinMM alarm timer via mm_start_timer() (the
      current default for Windows) can increase the "tick rate" on Windows
      OSs and affect frequency scaling, and in the case of tools that run
      in guest OSs such has qemu-ga, the impact can be fairly dramatic
      (+20%/20% user/sys time on a core 2 processor was observed from an idle
      Windows XP guest).
      
      This patch doesn't address the issue directly (not sure what a good
      solution would be for Windows, or what other situations it might be
      noticeable), but it at least limits the scope of the issue to programs
      that "opt-in" to using the main-loop.c functions by only enabling alarm
      timers when qemu_init_main_loop() is called, which is already required
      to make use of those facilities, so existing users shouldn't be
      affected.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d34e8f6e
  4. 22 12月, 2011 1 次提交
  5. 02 12月, 2011 1 次提交
  6. 22 10月, 2011 2 次提交