On Wed, 4 May 2016 09:50:57 +0200 Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote: > The feedback about the logic triggered some more experiments on my side. > So I was experimenting with some different workloads/heuristics and it > seems that even more aggressive shrinking (basically resetting to 0 as soon > as an invalid poll comes along) does improve the cpu usage even more. Do we still keep the shrink instead of resetting to 0 explicitly? (In case the default shrink factor was set to != 0.) We'd lose a tuneable, but it seems the aggressiveness is warranted. > (So the new diff looks like) > @@ -2034,7 +2036,9 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu) > out: > block_ns = ktime_to_ns(cur) - ktime_to_ns(start); > > - if (halt_poll_ns) { > + if (!vcpu_valid_wakeup(vcpu)) > + shrink_halt_poll_ns(vcpu); > + else if (halt_poll_ns) { > if (block_ns <= vcpu->halt_poll_ns) > ; ...making this if (halt_poll_ns && vcpu_valid_wakeup(vcpu)) { -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html