Re: [PATCH 3/5] KVM: ensure pool time is longer than block_ns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/11/19 22:16, Marcelo Tosatti wrote:
>  		if (!vcpu_valid_wakeup(vcpu)) {
>  			shrink_halt_poll_ns(vcpu);
>  		} else if (halt_poll_ns) {
> -			if (block_ns <= vcpu->halt_poll_ns)
> +			if (block_ns < vcpu->halt_poll_ns)
>  				;
>  			/* we had a short halt and our poll time is too small */
>  			else if (block_ns < halt_poll_ns)

What about making this "if (!waited)"?  The result would be very readable:

                        if (!waited)
                                ;
                        /* we had a long block, shrink polling */
                        else if (block_ns > halt_poll_ns && vcpu->halt_poll_ns)
                                shrink_halt_poll_ns(vcpu);
                        /* we had a short halt and our poll time is too small */
                        else if (block_ns < halt_poll_ns && vcpu->halt_poll_ns < halt_poll_ns)
                                grow_halt_poll_ns(vcpu);

Paolo





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux