Linux virtualization list
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	x86@kernel.org, virtualization@lists.linux-foundation.org
Cc: Juergen Gross <jgross@suse.com>,
	jeremy@goop.org, peterz@infradead.org, chrisw@sous-sol.org,
	mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com,
	longman@redhat.com, akataria@vmware.com,
	boris.ostrovsky@oracle.com
Subject: [PATCH 0/4] make virt_spin_lock() a pvops function
Date: Tue,  5 Sep 2017 15:24:40 +0200	[thread overview]
Message-ID: <20170905132444.7163-1-jgross@suse.com> (raw)

With virt_spin_lock() being a pvops function 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.

Juergen Gross (4):
  paravirt: add generic _paravirt_false() function
  paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare
    metal
  paravirt: add virt_spin_lock pvops function
  paravirt,xen: correct xen_nopvspin case

 arch/x86/include/asm/paravirt.h       |  5 ++++
 arch/x86/include/asm/paravirt_types.h |  3 +++
 arch/x86/include/asm/qspinlock.h      | 48 ++++++++++++++++++++++++-----------
 arch/x86/kernel/paravirt-spinlocks.c  | 22 ++++++++--------
 arch/x86/kernel/paravirt.c            |  7 +++++
 arch/x86/kernel/paravirt_patch_32.c   | 18 ++++++-------
 arch/x86/kernel/paravirt_patch_64.c   | 17 +++++--------
 arch/x86/kernel/smpboot.c             |  2 ++
 arch/x86/xen/spinlock.c               |  2 ++
 9 files changed, 79 insertions(+), 45 deletions(-)

-- 
2.12.3

             reply	other threads:[~2017-09-05 13:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 13:24 Juergen Gross [this message]
2017-09-05 13:24 ` [PATCH 1/4] paravirt: add generic _paravirt_false() function Juergen Gross
2017-09-05 13:24 ` [PATCH 2/4] paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal Juergen Gross
2017-09-05 13:24 ` [PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross
2017-09-05 13:24 ` [PATCH 4/4] paravirt,xen: correct xen_nopvspin case Juergen Gross
     [not found] ` <20170905132444.7163-4-jgross@suse.com>
2017-09-05 13:55   ` [PATCH 3/4] paravirt: add virt_spin_lock pvops function Peter Zijlstra
2017-09-05 14:01     ` Juergen Gross
2017-09-05 14:02   ` Waiman Long
     [not found]   ` <3eee978b-e570-5675-7840-c448375b02fc@redhat.com>
2017-09-05 14:08     ` Peter Zijlstra
2017-09-05 14:19       ` Waiman Long
2017-09-05 14:10   ` Waiman Long
     [not found]   ` <c62a47cd-c46d-bfbf-77f2-ec27c86c0f7c@redhat.com>
2017-09-05 14:18     ` Juergen Gross
     [not found]     ` <42918500-4487-f0d8-e6fd-99e4d0d7f1bf@suse.com>
2017-09-05 14:24       ` Waiman Long
2017-09-05 14:31         ` Waiman Long
2017-09-05 14:42           ` Juergen Gross
2017-09-06  7:08           ` Peter Zijlstra
     [not found]           ` <20170906070816.s6rtgtqpljnbudux@hirez.programming.kicks-ass.net>
2017-09-06 12:44             ` Waiman Long
     [not found]             ` <dd4511e9-3730-913b-9a80-59476661f3c8@redhat.com>
2017-09-06 13:06               ` Peter Zijlstra
     [not found]               ` <20170906130600.2dke3ntcw2i5fss2@hirez.programming.kicks-ass.net>
2017-09-06 13:11                 ` Waiman Long

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=20170905132444.7163-1-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=akataria@vmware.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=chrisw@sous-sol.org \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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