1. 08 1月, 2014 32 次提交
  2. 22 11月, 2013 2 次提交
    • P
      target-i386: yield to another VCPU on PAUSE · b5fc314b
      Paolo Bonzini 提交于
      After commit b1bbfe72 (aio / timers: On timer modification, qemu_notify
      or aio_notify, 2013-08-21) FreeBSD guests report a huge slowdown.
      
      The problem shows up as soon as FreeBSD turns out its periodic (~1 ms)
      tick, but the timers are only the trigger for a pre-existing problem.
      
      Before the offending patch, setting a timer did a timer_settime system call.
      
      After, setting the timer exits the event loop (which uses poll) and
      reenters it with a new deadline.  This does not cause any slowdown; the
      difference is between one system call (timer_settime and a signal
      delivery (SIGALRM) before the patch, and two system calls afterwards
      (write to a pipe or eventfd + calling poll again when re-entering the
      event loop).
      
      Unfortunately, the exit/enter causes the main loop to grab the iothread
      lock, which in turns kicks the VCPU thread out of execution.  This
      causes TCG to execute the next VCPU in its round-robin scheduling of
      VCPUS.  When the second VCPU is mostly unused, FreeBSD runs a "pause"
      instruction in its idle loop which only burns cycles without any
      progress.  As soon as the timer tick expires, the first VCPU runs
      the interrupt handler but very soon it sets it again---and QEMU
      then goes back doing nothing in the second VCPU.
      
      The fix is to make the pause instruction do "cpu_loop_exit".
      Reported-by: NLuigi Rizzo <rizzo@iet.unipi.it>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b5fc314b
    • R
      target-i386: Fix addr32 prefix in gen_lea_modrm · 7865eec4
      Richard Henderson 提交于
      Fix the following run-test-x86_64 testsuite failures:
      
      -lea (%%eax) = 0000000000000001
      -lea (%%ebx) = 0000000000000002
      -lea (%%ecx) = 0000000000000004
      -lea (%%edx) = 0000000000000008
      -lea (%%esi) = 0000000000000010
      -lea (%%edi) = 0000000000000020
      +lea (%%eax) = 0000abcc00000001
      +lea (%%ebx) = 0000abcf00000002
      +lea (%%ecx) = 0000abc900000004
      +lea (%%edx) = 0000abc500000008
      +lea (%%esi) = 0000abdd00000010
      +lea (%%edi) = 0000abed00000020
      
      In addition, reduce ifdeffery and minimize the number of TCG ops
      produced during address computation.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      Message-id: 1384219016-5170-1-git-send-email-rth@twiddle.net
      Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
      7865eec4
  3. 21 11月, 2013 1 次提交
    • P
      target-i386: yield to another VCPU on PAUSE · 81f3053b
      Paolo Bonzini 提交于
      After commit b1bbfe72 (aio / timers: On timer modification, qemu_notify
      or aio_notify, 2013-08-21) FreeBSD guests report a huge slowdown.
      
      The problem shows up as soon as FreeBSD turns out its periodic (~1 ms)
      tick, but the timers are only the trigger for a pre-existing problem.
      
      Before the offending patch, setting a timer did a timer_settime system call.
      
      After, setting the timer exits the event loop (which uses poll) and
      reenters it with a new deadline.  This does not cause any slowdown; the
      difference is between one system call (timer_settime and a signal
      delivery (SIGALRM) before the patch, and two system calls afterwards
      (write to a pipe or eventfd + calling poll again when re-entering the
      event loop).
      
      Unfortunately, the exit/enter causes the main loop to grab the iothread
      lock, which in turns kicks the VCPU thread out of execution.  This
      causes TCG to execute the next VCPU in its round-robin scheduling of
      VCPUS.  When the second VCPU is mostly unused, FreeBSD runs a "pause"
      instruction in its idle loop which only burns cycles without any
      progress.  As soon as the timer tick expires, the first VCPU runs
      the interrupt handler but very soon it sets it again---and QEMU
      then goes back doing nothing in the second VCPU.
      
      The fix is to make the pause instruction do "cpu_loop_exit".
      
      Cc: Richard Henderson <rth@twiddle.net>
      Reported-by: NLuigi Rizzo <rizzo@iet.unipi.it>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Message-id: 1384948442-24217-1-git-send-email-pbonzini@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
      81f3053b
  4. 11 10月, 2013 1 次提交
  5. 13 9月, 2013 1 次提交
  6. 03 9月, 2013 1 次提交
  7. 23 7月, 2013 1 次提交
  8. 10 7月, 2013 1 次提交