All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>, Wanpeng Li <wanpeng.li@hotmail.com>
Subject: Re: [PATCH] KVM: halt_polling: allow tuning of grow/shrink
Date: Tue, 9 Feb 2016 13:21:10 +0100	[thread overview]
Message-ID: <56B9D9B6.2040303@de.ibm.com> (raw)
In-Reply-To: <1455019243-87616-1-git-send-email-borntraeger@de.ibm.com>

On 02/09/2016 01:00 PM, Christian Borntraeger wrote:
> Right now halt_poll_ns can be change during runtime. The
> grow and shrink factors can only be set during module load.
> Let's make this consistent and allow changes during runtime.
> To avoid dirty tricky like setting shrink to 0 after the
> check for 0, use READ_ONCE to get a consistent number for
> all cases.
> 
> Cc: Wanpeng Li <wanpeng.li@hotmail.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  virt/kvm/kvm_main.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 726d7c8..eafea6f 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -72,11 +72,11 @@ module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR);
> 
>  /* Default doubles per-vcpu halt_poll_ns. */
>  static unsigned int halt_poll_ns_grow = 2;
> -module_param(halt_poll_ns_grow, int, S_IRUGO);
> +module_param(halt_poll_ns_grow, int, S_IRUGO | S_IWUSR);

Please let me know if I should respin with a global fixup
regarding signedness:

Right now we have a mix of
uint:
>  static unsigned int halt_poll_ns_grow = 2;
int:
> +module_param(halt_poll_ns_grow, int, S_IRUGO | S_IWUSR);
int:
> -	int old, val;

I think having everything as unsigned int would be
the right thing.

Christian


      reply	other threads:[~2016-02-09 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 12:00 [PATCH] KVM: halt_polling: allow tuning of grow/shrink Christian Borntraeger
2016-02-09 12:21 ` 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=56B9D9B6.2040303@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=kvm@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.