Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1212150 > unrolled thread

[PATCH 1/3] KVM: make halt_poll_ns per-VCPU

Started byWanpeng Li <wanpeng.li@hotmail.com>
First post2015-08-24 15:00 +0200
Last post2015-08-25 00:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] KVM: make halt_poll_ns per-VCPU Wanpeng Li <wanpeng.li@hotmail.com> - 2015-08-24 15:00 +0200
    Re: [PATCH 1/3] KVM: make halt_poll_ns per-VCPU David Matlack <dmatlack@google.com> - 2015-08-24 19:00 +0200
      Re: [PATCH 1/3] KVM: make halt_poll_ns per-VCPU Wanpeng Li <wanpeng.li@hotmail.com> - 2015-08-25 00:40 +0200

#1212150 — [PATCH 1/3] KVM: make halt_poll_ns per-VCPU

FromWanpeng Li <wanpeng.li@hotmail.com>
Date2015-08-24 15:00 +0200
Subject[PATCH 1/3] KVM: make halt_poll_ns per-VCPU
Message-ID<q0ZvZ-8a9-31@gated-at.bofh.it>
Change halt_poll_ns into per-VCPU variable, seeded from module parameter,
to allow greater flexibility.

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
---
 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/

[toc] | [next] | [standalone]


#1212346

FromDavid Matlack <dmatlack@google.com>
Date2015-08-24 19:00 +0200
Message-ID<q13gf-56Y-25@gated-at.bofh.it>
In reply to#1212150
On Mon, Aug 24, 2015 at 5:53 AM, Wanpeng Li <wanpeng.li@hotmail.com> 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.

>
> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
> ---
>  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/

[toc] | [prev] | [next] | [standalone]


#1212562

FromWanpeng Li <wanpeng.li@hotmail.com>
Date2015-08-25 00:40 +0200
Message-ID<q18zg-4Eq-27@gated-at.bofh.it>
In reply to#1212346
On 8/25/15 12:59 AM, David Matlack wrote:
> On Mon, Aug 24, 2015 at 5:53 AM, Wanpeng Li <wanpeng.li@hotmail.com> 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 <wanpeng.li@hotmail.com>
>> ---
>>   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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web