From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-kernel@vger.kernel.org, pbonzini@redhat.com,
rkrcmar@redhat.com, rafael.j.wysocki@intel.com,
joao.m.martins@oracle.com, mtosatti@redhat.com,
kvm@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH RESEND v2 2/4] KVM: ensure grow start value is nonzero
Date: Tue, 12 Nov 2019 20:19:14 +0800 [thread overview]
Message-ID: <0c8543e6-7664-cce9-c890-a10663d76d55@oracle.com> (raw)
In-Reply-To: <20191111201320.GA7431@linux.intel.com>
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
next prev parent reply other threads:[~2019-11-12 12:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 11:54 [PATCH RESEND v2 0/4] misc fixes on halt-poll code for both KVM and guest Zhenzhong Duan
2019-11-06 11:54 ` [PATCH RESEND v2 1/4] cpuidle-haltpoll: ensure grow start value is nonzero Zhenzhong Duan
2019-11-15 10:06 ` Rafael J. Wysocki
2019-11-15 10:16 ` Rafael J. Wysocki
2019-11-15 10:26 ` Rafael J. Wysocki
2019-11-17 9:02 ` Zhenzhong Duan
2019-11-06 11:55 ` [PATCH RESEND v2 2/4] KVM: " Zhenzhong Duan
2019-11-11 20:13 ` Sean Christopherson
2019-11-12 12:19 ` Zhenzhong Duan [this message]
2019-11-06 11:55 ` [PATCH RESEND v2 3/4] cpuidle-haltpoll: ensure cpu_halt_poll_us in right scope Zhenzhong Duan
2019-11-15 10:45 ` Rafael J. Wysocki
2019-11-17 8:57 ` Zhenzhong Duan
2019-11-06 11:55 ` [PATCH RESEND v2 4/4] KVM: ensure vCPU halt_poll_us " Zhenzhong Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c8543e6-7664-cce9-c890-a10663d76d55@oracle.com \
--to=zhenzhong.duan@oracle.com \
--cc=joao.m.martins@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).