From: Pontus Fuchs <pontus.fuchs@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
gleb@kernel.org
Subject: Re: Regression: sched/preempt: Add static_key() to preempt_notifiers breaks my KVM
Date: Thu, 25 Jun 2015 14:15:32 +0200 [thread overview]
Message-ID: <558BF0E4.50602@gmail.com> (raw)
In-Reply-To: <20150625120949.GZ3644@twins.programming.kicks-ass.net>
On 2015-06-25 14:09, Peter Zijlstra wrote:
> On Thu, Jun 25, 2015 at 02:00:02PM +0200, Pontus Fuchs wrote:
>> Hi,
>>
>
> That seems pointless..
>
> ---
> virt/kvm/kvm_main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 90977418aeb6..d7aafa0458a0 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -128,8 +128,9 @@ int vcpu_load(struct kvm_vcpu *vcpu)
>
> if (mutex_lock_killable(&vcpu->mutex))
> return -EINTR;
> - cpu = get_cpu();
> preempt_notifier_register(&vcpu->preempt_notifier);
> +
> + cpu = get_cpu();
> kvm_arch_vcpu_load(vcpu, cpu);
> put_cpu();
> return 0;
> @@ -139,8 +140,8 @@ void vcpu_put(struct kvm_vcpu *vcpu)
> {
> preempt_disable();
> kvm_arch_vcpu_put(vcpu);
> - preempt_notifier_unregister(&vcpu->preempt_notifier);
> preempt_enable();
> + preempt_notifier_unregister(&vcpu->preempt_notifier);
> mutex_unlock(&vcpu->mutex);
> }
Tested ok. Thanks.
BR,
Pontus
next prev parent reply other threads:[~2015-06-25 12:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 12:00 Regression: sched/preempt: Add static_key() to preempt_notifiers breaks my KVM Pontus Fuchs
2015-06-25 12:09 ` Peter Zijlstra
2015-06-25 12:15 ` Pontus Fuchs [this message]
2015-06-25 12:55 ` [PATCH] sched,kvm: Fix KVM preempt_notifier usage Peter Zijlstra
2015-06-30 11:10 ` [tip:sched/urgent] sched/preempt, kvm: " tip-bot for Peter Zijlstra
2015-07-03 11:23 ` Paolo Bonzini
2015-07-03 11:12 ` [PATCH] sched,kvm: " Paolo Bonzini
2015-07-03 12:19 ` Peter Zijlstra
2015-07-03 12:31 ` Paolo Bonzini
2015-07-03 13:17 ` Peter Zijlstra
2015-07-03 15:16 ` Peter Zijlstra
2015-07-03 15:26 ` Paolo Bonzini
2015-07-03 15:38 ` Paolo Bonzini
2015-07-03 15:42 ` Peter Zijlstra
2015-07-03 15:46 ` Paolo Bonzini
2015-07-03 15:57 ` Takashi Iwai
2015-06-30 13:47 ` Regression: sched/preempt: Add static_key() to preempt_notifiers breaks my KVM Josh Boyer
2015-07-01 6:55 ` Ingo Molnar
2015-07-03 13:15 ` Takashi Iwai
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=558BF0E4.50602@gmail.com \
--to=pontus.fuchs@gmail.com \
--cc=gleb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox