Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754497AbbHXWfQ (ORCPT ); Mon, 24 Aug 2015 18:35:16 -0400 Received: from blu004-omc1s35.hotmail.com ([65.55.116.46]:56228 "EHLO BLU004-OMC1S35.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbbHXWfP (ORCPT ); Mon, 24 Aug 2015 18:35:15 -0400 X-TMN: [bePa+zaCIz43coehXNbSp3YqRJb1Pvyv] X-Originating-Email: [wanpeng.li@hotmail.com] Message-ID: Subject: Re: [PATCH 1/3] KVM: make halt_poll_ns per-VCPU To: David Matlack References: <1440420804-15198-1-git-send-email-wanpeng.li@hotmail.com> CC: Paolo Bonzini , kvm list , "linux-kernel@vger.kernel.org" From: Wanpeng Li Date: Tue, 25 Aug 2015 06:35:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Aug 2015 22:35:12.0933 (UTC) FILETIME=[2415AD50:01D0DEBD] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1977 Lines: 57 On 8/25/15 12:59 AM, David Matlack wrote: > On Mon, Aug 24, 2015 at 5:53 AM, Wanpeng Li wrote: >> Change halt_poll_ns into per-VCPU variable, seeded from module parameter, >> to allow greater flexibility. > You should also change kvm_vcpu_block to read halt_poll_ns from > the vcpu instead of the module parameter. Indeed, thanks for your review. :-) Regards, Wanpeng Li > >> Signed-off-by: Wanpeng Li >> --- >> include/linux/kvm_host.h | 1 + >> virt/kvm/kvm_main.c | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h >> index 81089cf..1bef9e2 100644 >> --- a/include/linux/kvm_host.h >> +++ b/include/linux/kvm_host.h >> @@ -242,6 +242,7 @@ struct kvm_vcpu { >> int sigset_active; >> sigset_t sigset; >> struct kvm_vcpu_stat stat; >> + unsigned int halt_poll_ns; >> >> #ifdef CONFIG_HAS_IOMEM >> int mmio_needed; >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index d8db2f8f..a122b52 100644 >> --- a/virt/kvm/kvm_main.c >> +++ b/virt/kvm/kvm_main.c >> @@ -217,6 +217,7 @@ int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) >> vcpu->kvm = kvm; >> vcpu->vcpu_id = id; >> vcpu->pid = NULL; >> + vcpu->halt_poll_ns = halt_poll_ns; >> init_waitqueue_head(&vcpu->wq); >> kvm_async_pf_vcpu_init(vcpu); >> >> -- >> 1.9.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/