kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: remove pointless cpu hotplug messages
@ 2015-05-05  7:39 Heiko Carstens
  2015-05-05 11:20 ` Christian Borntraeger
  2015-05-07  9:31 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Carstens @ 2015-05-05  7:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, linux-kernel, Heiko Carstens

On cpu hotplug only KVM emits an unconditional message that its notifier
has been called. It certainly can be assumed that calling cpu hotplug
notifiers work, therefore there is no added value if KVM prints a message.

If an error happens on cpu online KVM will still emit a warning.

So let's remove this superfluous message.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 virt/kvm/kvm_main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 90977418aeb6..5fb52af5b975 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2882,18 +2882,12 @@ static int hardware_enable_all(void)
 static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
 			   void *v)
 {
-	int cpu = (long)v;
-
 	val &= ~CPU_TASKS_FROZEN;
 	switch (val) {
 	case CPU_DYING:
-		pr_info("kvm: disabling virtualization on CPU%d\n",
-		       cpu);
 		hardware_disable();
 		break;
 	case CPU_STARTING:
-		pr_info("kvm: enabling virtualization on CPU%d\n",
-		       cpu);
 		hardware_enable();
 		break;
 	}
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: remove pointless cpu hotplug messages
  2015-05-05  7:39 [PATCH] KVM: remove pointless cpu hotplug messages Heiko Carstens
@ 2015-05-05 11:20 ` Christian Borntraeger
  2015-05-07  9:31 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-05-05 11:20 UTC (permalink / raw)
  To: Heiko Carstens, Paolo Bonzini; +Cc: kvm, linux-kernel

Am 05.05.2015 um 09:39 schrieb Heiko Carstens:
> On cpu hotplug only KVM emits an unconditional message that its notifier
> has been called. It certainly can be assumed that calling cpu hotplug
> notifiers work, therefore there is no added value if KVM prints a message.
> 
> If an error happens on cpu online KVM will still emit a warning.
> 
> So let's remove this superfluous message.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Its really the only code that I know of that is chatty on cpu hotplug.

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



> ---
>  virt/kvm/kvm_main.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 90977418aeb6..5fb52af5b975 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2882,18 +2882,12 @@ static int hardware_enable_all(void)
>  static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
>  			   void *v)
>  {
> -	int cpu = (long)v;
> -
>  	val &= ~CPU_TASKS_FROZEN;
>  	switch (val) {
>  	case CPU_DYING:
> -		pr_info("kvm: disabling virtualization on CPU%d\n",
> -		       cpu);
>  		hardware_disable();
>  		break;
>  	case CPU_STARTING:
> -		pr_info("kvm: enabling virtualization on CPU%d\n",
> -		       cpu);
>  		hardware_enable();
>  		break;
>  	}
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: remove pointless cpu hotplug messages
  2015-05-05  7:39 [PATCH] KVM: remove pointless cpu hotplug messages Heiko Carstens
  2015-05-05 11:20 ` Christian Borntraeger
@ 2015-05-07  9:31 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-05-07  9:31 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: kvm, linux-kernel



On 05/05/2015 09:39, Heiko Carstens wrote:
> On cpu hotplug only KVM emits an unconditional message that its notifier
> has been called. It certainly can be assumed that calling cpu hotplug
> notifiers work, therefore there is no added value if KVM prints a message.
> 
> If an error happens on cpu online KVM will still emit a warning.
> 
> So let's remove this superfluous message.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  virt/kvm/kvm_main.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 90977418aeb6..5fb52af5b975 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2882,18 +2882,12 @@ static int hardware_enable_all(void)
>  static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
>  			   void *v)
>  {
> -	int cpu = (long)v;
> -
>  	val &= ~CPU_TASKS_FROZEN;
>  	switch (val) {
>  	case CPU_DYING:
> -		pr_info("kvm: disabling virtualization on CPU%d\n",
> -		       cpu);
>  		hardware_disable();
>  		break;
>  	case CPU_STARTING:
> -		pr_info("kvm: enabling virtualization on CPU%d\n",
> -		       cpu);
>  		hardware_enable();
>  		break;
>  	}
> 

Applied, thanks.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-07  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05  7:39 [PATCH] KVM: remove pointless cpu hotplug messages Heiko Carstens
2015-05-05 11:20 ` Christian Borntraeger
2015-05-07  9:31 ` Paolo Bonzini

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).