Re: [PATCH/RFC] KVM: halt_polling: provide a way to qualify wakeups during poll

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

 



On Mon,  2 May 2016 12:42:33 +0200
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:


> @@ -2038,14 +2039,16 @@ out:
>  		if (block_ns <= vcpu->halt_poll_ns)
>  			;
>  		/* we had a long block, shrink polling */
> -		else if (vcpu->halt_poll_ns && block_ns > halt_poll_ns)
> +		else if (!vcpu_valid_wakeup(vcpu) ||
> +			(vcpu->halt_poll_ns && block_ns > halt_poll_ns))
>  			shrink_halt_poll_ns(vcpu);
>  		/* we had a short halt and our poll time is too small */
>  		else if (vcpu->halt_poll_ns < halt_poll_ns &&
> -			block_ns < halt_poll_ns)
> +			block_ns < halt_poll_ns && vcpu_valid_wakeup(vcpu))

Isn't that vcpu_valid_wakeup() check superflous, as we have collected
all !vcpu_valid_wakeup() cases in the previous if?

>  			grow_halt_poll_ns(vcpu);
>  	} else
>  		vcpu->halt_poll_ns = 0;
> +	vcpu_reset_wakeup(vcpu);
> 
>  	trace_kvm_vcpu_wakeup(block_ns, waited);
>  }

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux