[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c8543e6-7664-cce9-c890-a10663d76d55@oracle.com>
Date: Tue, 12 Nov 2019 20:19:14 +0800
From: Zhenzhong Duan <zhenzhong.duan@...cle.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: linux-kernel@...r.kernel.org, pbonzini@...hat.com,
rkrcmar@...hat.com, rafael.j.wysocki@...el.com,
joao.m.martins@...cle.com, mtosatti@...hat.com,
kvm@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH RESEND v2 2/4] KVM: ensure grow start value is nonzero
On 2019/11/12 4:13, Sean Christopherson wrote:
> On Wed, Nov 06, 2019 at 07:55:00PM +0800, Zhenzhong Duan wrote:
>> vcpu->halt_poll_ns could be zeroed in certain cases (e.g. by
>> halt_poll_ns = 0). If halt_poll_grow_start is zero,
>> vcpu->halt_poll_ns will never be bigger than zero.
>>
>> Use param callback to avoid writing zero to halt_poll_grow_start.
> This doesn't explain why allowing an admin to disable halt polling by
> writing halt_poll_grow_start=0 is a bad thing. Paolo had the same
> question in v1, here[1] and in the guest driver[2].
>
> [1]https://lkml.kernel.org/r/57679389-6e4a-b7ad-559f-3128a608c28a@redhat.com
> [2]https://lkml.kernel.org/r/391dd11b-ebbb-28ff-5e57-4a795cd16a1b@redhat.com
Ok, answer all the same questions about grow_start=0 here.
VCPU halt polling time may be nonzero even if grow_start=0, such as in below situation:
0=grow_start< block_ns< (vcpu->halt_poll_ns)< halt_poll_ns
grow_start=0 has your mentioned effect only in below sequence:
1. set halt_poll_ns=0 to disable halt polling(this lead to vcpu->halt_poll_ns=0)
2. set grow_start=0
3. set halt_poll_ns to nonzero
4. Admin expect halt polling time auto adjust in range [0, nonzero], but polling time stick at 0.
So I think we should use halt_poll_ns=0 to disable halt polling instead of grow_start=0.
Zhenzhong
Powered by blists - more mailing lists