1. 16 6月, 2016 1 次提交
  2. 10 6月, 2016 20 次提交
  3. 13 5月, 2016 1 次提交
    • C
      KVM: halt_polling: provide a way to qualify wakeups during poll · 3491caf2
      Christian Borntraeger 提交于
      Some wakeups should not be considered a sucessful poll. For example on
      s390 I/O interrupts are usually floating, which means that _ALL_ CPUs
      would be considered runnable - letting all vCPUs poll all the time for
      transactional like workload, even if one vCPU would be enough.
      This can result in huge CPU usage for large guests.
      This patch lets architectures provide a way to qualify wakeups if they
      should be considered a good/bad wakeups in regard to polls.
      
      For s390 the implementation will fence of halt polling for anything but
      known good, single vCPU events. The s390 implementation for floating
      interrupts does a wakeup for one vCPU, but the interrupt will be delivered
      by whatever CPU checks first for a pending interrupt. We prefer the
      woken up CPU by marking the poll of this CPU as "good" poll.
      This code will also mark several other wakeup reasons like IPI or
      expired timers as "good". This will of course also mark some events as
      not sucessful. As  KVM on z runs always as a 2nd level hypervisor,
      we prefer to not poll, unless we are really sure, though.
      
      This patch successfully limits the CPU usage for cases like uperf 1byte
      transactional ping pong workload or wakeup heavy workload like OLTP
      while still providing a proper speedup.
      
      This also introduced a new vcpu stat "halt_poll_no_tuning" that marks
      wakeups that are considered not good for polling.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: Radim Krčmář <rkrcmar@redhat.com> (for an earlier version)
      Cc: David Matlack <dmatlack@google.com>
      Cc: Wanpeng Li <kernellwp@gmail.com>
      [Rename config symbol. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3491caf2
  4. 09 5月, 2016 6 次提交
  5. 08 3月, 2016 10 次提交
  6. 10 2月, 2016 2 次提交
    • C
      KVM: s390: bail out early on fatal signal in dirty logging · 1763f8d0
      Christian Borntraeger 提交于
      A KVM_GET_DIRTY_LOG ioctl might take a long time.
      This can result in fatal signals seemingly being ignored.
      Lets bail out during the dirty bit sync, if a fatal signal
      is pending.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      1763f8d0
    • C
      KVM: s390: do not block CPU on dirty logging · 70c88a00
      Christian Borntraeger 提交于
      When doing dirty logging on huge guests (e.g.600GB) we sometimes
      get rcu stall timeouts with backtraces like
      
      [ 2753.194083] ([<0000000000112fb2>] show_trace+0x12a/0x130)
      [ 2753.194092]  [<0000000000113024>] show_stack+0x6c/0xe8
      [ 2753.194094]  [<00000000001ee6a8>] rcu_pending+0x358/0xa48
      [ 2753.194099]  [<00000000001f20cc>] rcu_check_callbacks+0x84/0x168
      [ 2753.194102]  [<0000000000167654>] update_process_times+0x54/0x80
      [ 2753.194107]  [<00000000001bdb5c>] tick_sched_handle.isra.16+0x4c/0x60
      [ 2753.194113]  [<00000000001bdbd8>] tick_sched_timer+0x68/0x90
      [ 2753.194115]  [<0000000000182a88>] __run_hrtimer+0x88/0x1f8
      [ 2753.194119]  [<00000000001838ba>] hrtimer_interrupt+0x122/0x2b0
      [ 2753.194121]  [<000000000010d034>] do_extint+0x16c/0x170
      [ 2753.194123]  [<00000000005e206e>] ext_skip+0x38/0x3e
      [ 2753.194129]  [<000000000012157c>] gmap_test_and_clear_dirty+0xcc/0x118
      [ 2753.194134] ([<00000000001214ea>] gmap_test_and_clear_dirty+0x3a/0x118)
      [ 2753.194137]  [<0000000000132da4>] kvm_vm_ioctl_get_dirty_log+0xd4/0x1b0
      [ 2753.194143]  [<000000000012ac12>] kvm_vm_ioctl+0x21a/0x548
      [ 2753.194146]  [<00000000002b57f6>] do_vfs_ioctl+0x30e/0x518
      [ 2753.194149]  [<00000000002b5a9c>] SyS_ioctl+0x9c/0xb0
      [ 2753.194151]  [<00000000005e1ae6>] sysc_tracego+0x14/0x1a
      [ 2753.194153]  [<000003ffb75f3972>] 0x3ffb75f3972
      
      We should do a cond_resched in here.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      70c88a00