lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fc9eab27-5251-feb7-29f4-1e2923d5d013@oracle.com>
Date:   Tue, 12 Nov 2019 20:14:04 +0800
From:   Zhenzhong Duan <zhenzhong.duan@...cle.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Marcelo Tosatti <mtosatti@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        joao.m.martins@...cle.com, rafael.j.wysocki@...el.com,
        rkrcmar@...hat.com
Subject: Re: [PATCH 3/5] KVM: ensure pool time is longer than block_ns


On 2019/11/11 21:53, Paolo Bonzini wrote:
> 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);

This patch is dropped in v2 as it rarely happen in real scenario.

Appreciate you reviewing v2 in https://lkml.org/lkml/2019/11/6/447

Thanks

Zhenzhong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ