Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727660

[PATCH v3 0/2] guard virt_spin_lock() with a static key

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject [PATCH v3 0/2] guard virt_spin_lock() with a static key
Date Wed, 06 Sep 2017 19:40:01 +0200
Message-ID <umMsV-4XV-3@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, virtualization@lists.linux-foundation.org
X-Mailer git-send-email 2.12.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 27
Organization linux.* mail to news gateway
X-Original-Cc jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com, rusty@rustcorp.com.au, boris.ostrovsky@oracle.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, longman@redhat.com, Juergen Gross <jgross@suse.com>
X-Original-Date Wed, 6 Sep 2017 19:36:23 +0200
X-Original-Message-ID <20170906173625.18158-1-jgross@suse.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1727660

Show key headers only | View raw


With virt_spin_lock() being guarded by a static key the bare metal case
can be optimized by patching the call away completely. In case a kernel
running as a guest it can decide whether to use paravitualized
spinlocks, the current fallback to the unfair test-and-set scheme, or
to mimic the bare metal behavior.

V3:
- remove test for hypervisor environment from virt_spin_lock(9 as
  suggested by Waiman Long

V2:
- use static key instead of making virt_spin_lock() a pvops function

Juergen Gross (2):
  paravirt/locks: use new static key for controlling call of
    virt_spin_lock()
  paravirt,xen: correct xen_nopvspin case

 arch/x86/include/asm/qspinlock.h     | 11 ++++++++++-
 arch/x86/kernel/paravirt-spinlocks.c |  6 ++++++
 arch/x86/kernel/smpboot.c            |  2 ++
 arch/x86/xen/spinlock.c              |  2 ++
 kernel/locking/qspinlock.c           |  4 ++++
 5 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.12.3

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/2] guard virt_spin_lock() with a static key Juergen Gross <jgross@suse.com> - 2017-09-06 19:40 +0200
  [PATCH v3 2/2] paravirt,xen: correct xen_nopvspin case Juergen Gross <jgross@suse.com> - 2017-09-06 19:40 +0200
  [PATCH v3 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock() Juergen Gross <jgross@suse.com> - 2017-09-06 19:40 +0200

csiph-web