All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [patch-rt] kvm: Convert pvclock_gtod_sync_lock to raw_spinlock_t
Date: Fri, 20 Jan 2017 17:44:23 +0100	[thread overview]
Message-ID: <20170120164423.iunwa3hntguswabj@linutronix.de> (raw)
In-Reply-To: <1482735248.4476.58.camel@gmx.de>

On 2016-12-26 07:54:08 [+0100], Mike Galbraith wrote:

Not so sure about it.

> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1540,7 +1540,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu
>  	kvm_vcpu_write_tsc_offset(vcpu, offset);
>  	raw_spin_unlock_irqrestore(&kvm->arch.tsc_write_lock, flags);
>  
> -	spin_lock(&kvm->arch.pvclock_gtod_sync_lock);
> +	raw_spin_lock(&kvm->arch.pvclock_gtod_sync_lock);
>  	if (!matched) {
>  		kvm->arch.nr_vcpus_matched_tsc = 0;
>  	} else if (!already_matched) {
> @@ -1548,7 +1548,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu
>  	}
>  
>  	kvm_track_tsc_matching(vcpu);
> -	spin_unlock(&kvm->arch.pvclock_gtod_sync_lock);
> +	raw_spin_unlock(&kvm->arch.pvclock_gtod_sync_lock);
>  }
>  
>  EXPORT_SYMBOL_GPL(kvm_write_tsc);
> @@ -1715,7 +1715,7 @@ static void kvm_gen_update_masterclock(s
>  	struct kvm_vcpu *vcpu;
>  	struct kvm_arch *ka = &kvm->arch;
>  
> -	spin_lock(&ka->pvclock_gtod_sync_lock);
> +	raw_spin_lock(&ka->pvclock_gtod_sync_lock);
>  	kvm_make_mclock_inprogress_request(kvm);

kvm_make_mclock_inprogress_request() will do zalloc_cpumask_var().
off-stack zalloc is not yet working but I would like to enable it. Also
it does a SMP function call.

Couldn't we go the other way around and drop the local_irq_disable()?

Sebastian

  reply	other threads:[~2017-01-20 16:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 16:32 [ANNOUNCE] v4.9-rt1 Sebastian Andrzej Siewior
2016-12-26  6:54 ` [patch-rt] kvm: Convert pvclock_gtod_sync_lock to raw_spinlock_t Mike Galbraith
2017-01-20 16:44   ` Sebastian Andrzej Siewior [this message]
2017-01-20 17:32     ` Mike Galbraith
2016-12-26  7:00 ` [rfc patch-rt] posix_cpu_timers: Kill hotplug cpu notifier Mike Galbraith
2017-01-20 16:46   ` Sebastian Andrzej Siewior
2017-01-20 17:29     ` Mike Galbraith
2017-01-20 17:34       ` Sebastian Andrzej Siewior
2017-01-20 17:56         ` Mike Galbraith
2016-12-31  8:20 ` [patch-rt] softirq: Move ksoftirqd_running() under !CONFIG_PREEMPT_RT_FULL Mike Galbraith
2017-01-20 17:21   ` Sebastian Andrzej Siewior
2017-01-06  8:13 ` [rfc patch-rt] radix-tree: Partially disable memcg accounting in radix_tree_node_alloc() Mike Galbraith
2017-01-06  8:28   ` Mike Galbraith
2017-01-06  8:55   ` Michal Hocko
2017-01-06 10:52     ` Mike Galbraith
2017-01-06 12:20       ` Mike Galbraith
2017-01-06 12:44         ` Mike Galbraith
2017-01-25 15:06   ` Sebastian Andrzej Siewior
2017-01-26  3:42     ` Mike Galbraith
2017-01-08  8:32 ` {patch-rt] cpuset: Convert callback_lock to raw_spinlock_t Mike Galbraith
2017-01-25 15:45   ` Sebastian Andrzej Siewior

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=20170120164423.iunwa3hntguswabj@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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.