All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Wanpeng Li <wanpeng.li@hotmail.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: fix polling for guest halt continued even if disable it
Date: Tue, 15 Sep 2015 09:16:43 +0200	[thread overview]
Message-ID: <55F7C5DB.80903@de.ibm.com> (raw)
In-Reply-To: <BLU436-SMTP2173FDFA2A6CE0563384020805D0@phx.gbl>

Am 14.09.2015 um 11:38 schrieb Wanpeng Li:
> If there is already some polling ongoing, it's impossible to disable the 
> polling, since as soon as somebody sets halt_poll_ns to 0, polling will 
> never stop, as grow and shrink are only handled if halt_poll_ns is != 0.
> 
> This patch fix it by reset vcpu->halt_poll_ns in order to stop polling 
> when polling is disabled.
> 
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
> ---
>  virt/kvm/kvm_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 4662a88..f756cac0 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2012,7 +2012,8 @@ out:
>  		else if (vcpu->halt_poll_ns < halt_poll_ns &&
>  			block_ns < halt_poll_ns)
>  			grow_halt_poll_ns(vcpu);
> -	}
> +	} else
> +		vcpu->halt_poll_ns = 0;
> 
>  	trace_kvm_vcpu_wakeup(block_ns, waited);
>  }
> 

Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>

      reply	other threads:[~2015-09-15  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14  9:38 [PATCH] KVM: fix polling for guest halt continued even if disable it Wanpeng Li
2015-09-15  7:16 ` Christian Borntraeger [this message]

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=55F7C5DB.80903@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=wanpeng.li@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.